|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ChannelHandler
Represents the incoming view of a channel. The interface contains
callback methods which are invoked when the channel is established
(channelOpened(Channel)
), when a request from the
remote peer is received
(#receiveRequest(Channel, Message, Reply)
), or
when the channel has been closed
(#channelClosed(Channel)
).
Method Summary | |
---|---|
void |
channelClosed()
Invoked by the framework when the other peer decided to close this channel. |
void |
channelCloseRequested(CloseChannelRequest request)
Invoked by the framework when the other peer requested to close the channel. |
void |
channelOpened(Channel c)
Invoked by the framework when the channel has been successfully started. |
void |
channelStartFailed(int code,
java.lang.String message)
Invoked by the framework when the channel could not be started. |
void |
messageReceived(Message message,
Reply reply)
Invoked by the framework when the other peer sent a message to this peer on this channel. |
Method Detail |
---|
void channelOpened(Channel c)
c
- the channel that was openedvoid channelStartFailed(int code, java.lang.String message)
code
- the error codemessage
- the human readable error messagevoid messageReceived(Message message, Reply reply)
c
- the channel on which the message was receivedmessage
- the received messagereply
- the handler used to return a response.void channelCloseRequested(CloseChannelRequest request)
request
- the requestvoid channelClosed()
c
- the Channel that was closed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |