Stilts 0.1.0-SNAPSHOT

org.projectodd.stilts.stomp.server.websockets.protocol
Class Handshake

java.lang.Object
  extended by org.projectodd.stilts.stomp.server.websockets.protocol.Handshake
Direct Known Subclasses:
Handshake_Hixie75, Handshake_Ietf00

public abstract class Handshake
extends Object

Abstraction of web-socket handshake versions.

Since each version uses different headers and behaves differently, these differences are encapsulated in subclasses of Handshake.

Author:
Bob McWhirter
See Also:
HandshakeHandler

Constructor Summary
Handshake(String version)
           
 
Method Summary
abstract  org.jboss.netty.handler.codec.http.HttpResponse generateResponse(org.jboss.netty.handler.codec.http.HttpRequest request)
           
 String getVersion()
           
protected  String getWebSocketLocation(org.jboss.netty.handler.codec.http.HttpRequest request)
           
abstract  boolean matches(org.jboss.netty.handler.codec.http.HttpRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Handshake

public Handshake(String version)
Method Detail

getVersion

public String getVersion()

getWebSocketLocation

protected String getWebSocketLocation(org.jboss.netty.handler.codec.http.HttpRequest request)

matches

public abstract boolean matches(org.jboss.netty.handler.codec.http.HttpRequest request)

generateResponse

public abstract org.jboss.netty.handler.codec.http.HttpResponse generateResponse(org.jboss.netty.handler.codec.http.HttpRequest request)
                                                                          throws Exception
Throws:
Exception

Stilts 0.1.0-SNAPSHOT

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