|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.beep4j.internal.profile.ChannelManagementProfileImpl
public class ChannelManagementProfileImpl
Implementation of ChannelManagementProfile interface.
| Constructor Summary | |
|---|---|
ChannelManagementProfileImpl(boolean initiator)
|
|
| 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)
This method is only called on channels created through the startChannel methods of the Session. |
void |
closeChannel(int channelNumber,
CloseChannelCallback callback)
Send a close channel message. |
void |
closeSession(CloseCallback callback)
Closes the session. |
boolean |
connectionEstablished(java.net.SocketAddress address,
SessionHandler sessionHandler,
Reply response)
Invoked by the session when the connection has been established. |
ChannelHandler |
createChannelHandler(SessionManager manager)
Invoked by the framework to initialize the channel and to get the ChannelHandler for the profile. |
protected ChannelManagementMessageBuilder |
createChannelManagementMessageBuilder()
|
protected ChannelManagementMessageParser |
createChannelManagementMessageParser()
|
Message |
createError(int code,
java.lang.String diagnostics)
|
Message |
createGreeting(java.lang.String[] profiles)
|
protected MessageBuilder |
createMessageBuilder()
|
void |
messageReceived(Message message,
Reply handler)
Invoked by the framework when the other peer sent a message to this peer on this channel. |
BEEPError |
receivedError(Message message)
Invoked by the session when an error has been received during the session startup. |
Greeting |
receivedGreeting(Message message)
Invoked by the session when a greeting has been received during the session startup. |
void |
startChannel(int channelNumber,
ProfileInfo[] infos,
StartChannelCallback callback)
Sends a start channel message to the other peer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChannelManagementProfileImpl(boolean initiator)
| Method Detail |
|---|
protected ChannelManagementMessageBuilder createChannelManagementMessageBuilder()
protected ChannelManagementMessageParser createChannelManagementMessageParser()
protected MessageBuilder createMessageBuilder()
public void channelStartFailed(int code,
java.lang.String message)
channelStartFailed in interface ChannelHandlercode - the error codemessage - the human readable error message
java.lang.UnsupportedOperationException - unconditionallypublic void channelOpened(Channel c)
ChannelHandler
channelOpened in interface ChannelHandlerc - the channel that was opened
public void messageReceived(Message message,
Reply handler)
ChannelHandler
messageReceived in interface ChannelHandlermessage - the received messagehandler - the handler used to return a response.public void channelCloseRequested(CloseChannelRequest request)
ChannelHandler
channelCloseRequested in interface ChannelHandlerrequest - the requestpublic void channelClosed()
ChannelHandler
channelClosed in interface ChannelHandlerpublic ChannelHandler createChannelHandler(SessionManager manager)
ChannelManagementProfile
createChannelHandler in interface ChannelManagementProfilemanager - the SessionManager to be used by the profile
public boolean connectionEstablished(java.net.SocketAddress address,
SessionHandler sessionHandler,
Reply response)
ChannelManagementProfile
connectionEstablished in interface ChannelManagementProfileaddress - address of remote peersessionHandler - the SessionHandler of the sessionresponse - the ResponseHandler to be used to generate a response
public Message createGreeting(java.lang.String[] profiles)
public Message createError(int code,
java.lang.String diagnostics)
public Greeting receivedGreeting(Message message)
ChannelManagementProfile
receivedGreeting in interface ChannelManagementProfilemessage - the message to be parsed
public BEEPError receivedError(Message message)
ChannelManagementProfile
receivedError in interface ChannelManagementProfilemessage - the message to be parsed
public void startChannel(int channelNumber,
ProfileInfo[] infos,
StartChannelCallback callback)
ChannelManagementProfile
startChannel in interface ChannelManagementProfilechannelNumber - the channel number of the new peerinfos - the ProfileInfos to be passed inside the profile element in
the requestcallback - the callback that is invoked when the response is received
public void closeChannel(int channelNumber,
CloseChannelCallback callback)
ChannelManagementProfile
closeChannel in interface ChannelManagementProfilechannelNumber - the channel to be closedcallback - the callback that is invoked when the response is receivedpublic void closeSession(CloseCallback callback)
ChannelManagementProfile
closeSession in interface ChannelManagementProfilecallback - the callback used to notify about the response
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||