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

public abstract class BaseClientHandshakeHandler extends AbstractNamedChannelHandler
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

    Constructors
    Constructor
    Description
    BaseClientHandshakeHandler(ClientHandshake clientHandshake, ExecutorService executorService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addListener(ClientHandshakeListener clientHandshakeListener)
     
    void
    channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)
     
    void
    messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
     
    protected abstract void
    onFailure(String errorMessage, org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
     
    protected abstract void
    onSuccess(ConnectionHeader incommingConnectionHeader, org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
    Called when the ClientHandshake succeeds and will block the network thread until it returns.

    Methods inherited from class org.ros.internal.transport.tcp.AbstractNamedChannelHandler

    toString

    Methods 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, writeRequested

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.jboss.netty.channel.ChannelDownstreamHandler

    handleDownstream

    Methods inherited from interface org.jboss.netty.channel.ChannelUpstreamHandler

    handleUpstream

    Methods inherited from interface org.ros.internal.transport.tcp.NamedChannelHandler

    getName
  • Constructor Details

  • Method Details

    • addListener

      public void addListener(ClientHandshakeListener clientHandshakeListener)
    • channelConnected

      public void channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e) throws Exception
      Overrides:
      channelConnected in class org.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:
      messageReceived in class org.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 the ClientHandshake succeeds 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)