Package org.ros.internal.transport
Class BaseClientHandshakeHandler
java.lang.Object
org.jboss.netty.channel.SimpleChannelHandler
org.ros.internal.transport.tcp.AbstractNamedChannelHandler
org.ros.internal.transport.BaseClientHandshakeHandler
- All Implemented Interfaces:
org.jboss.netty.channel.ChannelDownstreamHandler,org.jboss.netty.channel.ChannelHandler,org.jboss.netty.channel.ChannelUpstreamHandler,NamedChannelHandler
Common functionality for
ClientHandshake handlers.- Author:
- damonkohler@google.com (Damon Kohler)
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable -
Constructor Summary
ConstructorsConstructorDescriptionBaseClientHandshakeHandler(ClientHandshake clientHandshake, ExecutorService executorService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ClientHandshakeListener clientHandshakeListener) voidchannelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e) voidmessageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e) protected abstract voidonFailure(String errorMessage, org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e) protected abstract voidonSuccess(ConnectionHeader incommingConnectionHeader, org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e) Called when theClientHandshakesucceeds and will block the network thread until it returns.Methods inherited from class org.ros.internal.transport.tcp.AbstractNamedChannelHandler
toStringMethods inherited from class org.jboss.netty.channel.SimpleChannelHandler
bindRequested, channelBound, channelClosed, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, exceptionCaught, handleDownstream, handleUpstream, setInterestOpsRequested, unbindRequested, writeComplete, writeRequestedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jboss.netty.channel.ChannelDownstreamHandler
handleDownstreamMethods inherited from interface org.jboss.netty.channel.ChannelUpstreamHandler
handleUpstreamMethods inherited from interface org.ros.internal.transport.tcp.NamedChannelHandler
getName
-
Constructor Details
-
BaseClientHandshakeHandler
-
-
Method Details
-
addListener
-
channelConnected
public void channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e) throws Exception - Overrides:
channelConnectedin classorg.jboss.netty.channel.SimpleChannelHandler- Throws:
Exception
-
messageReceived
public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e) throws Exception - Overrides:
messageReceivedin classorg.jboss.netty.channel.SimpleChannelHandler- Throws:
Exception
-
onSuccess
protected abstract void onSuccess(ConnectionHeader incommingConnectionHeader, org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e) Called when theClientHandshakesucceeds and will block the network thread until it returns.This must block in order to allow changes to the pipeline to be made before further messages arrive.
- Parameters:
incommingConnectionHeader-ctx-e-
-
onFailure
protected abstract void onFailure(String errorMessage, org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
-