org.cometd.server.transport
Class WebSocketTransport
java.lang.Object
org.cometd.server.AbstractServerTransport
org.cometd.server.transport.HttpTransport
org.cometd.server.transport.WebSocketTransport
- All Implemented Interfaces:
- ServerTransport, Transport
public class WebSocketTransport
- extends HttpTransport
|
Method Summary |
boolean |
accept(javax.servlet.http.HttpServletRequest request)
|
protected java.lang.String |
checkOrigin(javax.servlet.http.HttpServletRequest request,
java.lang.String host,
java.lang.String origin)
|
java.net.InetSocketAddress |
getCurrentLocalAddress()
|
java.net.InetSocketAddress |
getCurrentRemoteAddress()
|
void |
handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
init()
Initialise the transport. |
| Methods inherited from class org.cometd.server.AbstractServerTransport |
getAdvice, getBayeux, getInterval, getMaxInterval, getMaxLazyTimeout, getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, getTimeout, isMetaConnectDeliveryOnly, setAdvice, setInterval, setMaxInterval, setMaxLazyTimeout, setMetaConnectDeliveryOnly, setOption, setOptionPrefix, setTimeout |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
PROTOCOL_OPTION
public static final java.lang.String PROTOCOL_OPTION
- See Also:
- Constant Field Values
BUFFER_SIZE_OPTION
public static final java.lang.String BUFFER_SIZE_OPTION
- See Also:
- Constant Field Values
WebSocketTransport
public WebSocketTransport(BayeuxServerImpl bayeux)
init
public void init()
- Description copied from class:
AbstractServerTransport
- Initialise the transport.
Initialise the transport, resolving default and direct options.
After the call to init, the
#getMutableOptions() set should
be reset to reflect only the options that can be changed on a running
transport.
This implementation clears the mutable options set.
- Overrides:
init in class HttpTransport
accept
public boolean accept(javax.servlet.http.HttpServletRequest request)
- Specified by:
accept in class HttpTransport
handle
public void handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Specified by:
handle in class HttpTransport
- Throws:
java.io.IOException
javax.servlet.ServletException
checkOrigin
protected java.lang.String checkOrigin(javax.servlet.http.HttpServletRequest request,
java.lang.String host,
java.lang.String origin)
getCurrentLocalAddress
public java.net.InetSocketAddress getCurrentLocalAddress()
- Specified by:
getCurrentLocalAddress in interface ServerTransport- Overrides:
getCurrentLocalAddress in class HttpTransport
- See Also:
HttpTransport.getCurrentLocalAddress()
getCurrentRemoteAddress
public java.net.InetSocketAddress getCurrentRemoteAddress()
- Specified by:
getCurrentRemoteAddress in interface ServerTransport- Overrides:
getCurrentRemoteAddress in class HttpTransport
- See Also:
HttpTransport.getCurrentRemoteAddress()
Copyright © 2008-2010 Dojo Foundation. All Rights Reserved.