protected static interface CommandTransport.CommandReceiver
| Modifier and Type | Method and Description |
|---|---|
void |
handle(Command cmd)
Notifies the channel that a new
Command was received from the other side. |
void |
terminate(IOException e)
Indicates that the transport has encountered a problem.
|
void handle(Command cmd)
Command was received from the other side.
Channel performs all the error recovery of the error resulting from the command invocation.
Channel implements this method in a non-reentrant fashion; a transport can invoke this method
from different threads, but as the class javadoc states, the transport must
guarantee in-order delivery of the commands, and that means you cannot call this method
concurrently.
cmd - The command received. This object must be read from the payload
using Command.readFrom(Channel, byte[]).void terminate(IOException e)
handle(Command),
and it'll abort the communication.Copyright © 2004–2018. All rights reserved.