Stilts 0.1.0-SNAPSHOT

org.projectodd.stilts.stomp.client.protocol
Class StompConnectionNegotiator

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by org.projectodd.stilts.stomp.client.protocol.AbstractClientHandler
          extended by org.projectodd.stilts.stomp.client.protocol.AbstractClientControlFrameHandler
              extended by org.projectodd.stilts.stomp.client.protocol.StompConnectionNegotiator
All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

public class StompConnectionNegotiator
extends AbstractClientControlFrameHandler

Base STOMP protocol connection negotiator.

This handler reacts to Netty's CONNECTED event and handles the handshake of the STOMP CONNECT and CONNECTED interaction.

Author:
Bob McWhirter

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
StompConnectionNegotiator(ClientContext clientContext, String host)
           
 
Method Summary
 void channelConnected(org.jboss.netty.channel.ChannelHandlerContext context, org.jboss.netty.channel.ChannelStateEvent e)
           
protected  void handleControlFrame(org.jboss.netty.channel.ChannelHandlerContext channelContext, StompFrame frame)
           
 
Methods inherited from class org.projectodd.stilts.stomp.client.protocol.AbstractClientControlFrameHandler
handleStompFrame, messageReceived
 
Methods inherited from class org.projectodd.stilts.stomp.client.protocol.AbstractClientHandler
exceptionCaught, getClientContext, sendError, sendErrorAndClose, sendFrame
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelClosed, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StompConnectionNegotiator

public StompConnectionNegotiator(ClientContext clientContext,
                                 String host)
                          throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException
Method Detail

channelConnected

public void channelConnected(org.jboss.netty.channel.ChannelHandlerContext context,
                             org.jboss.netty.channel.ChannelStateEvent e)
                      throws Exception
Overrides:
channelConnected in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
Exception

handleControlFrame

protected void handleControlFrame(org.jboss.netty.channel.ChannelHandlerContext channelContext,
                                  StompFrame frame)
Specified by:
handleControlFrame in class AbstractClientControlFrameHandler

Stilts 0.1.0-SNAPSHOT

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.