Class WebSocketServerProtocolHandler
java.lang.Object
org.jboss.netty.channel.SimpleChannelUpstreamHandler
org.jboss.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler
- All Implemented Interfaces:
ChannelHandler,ChannelUpstreamHandler,LifeCycleAwareChannelHandler
public class WebSocketServerProtocolHandler
extends SimpleChannelUpstreamHandler
implements LifeCycleAwareChannelHandler
Handles WebSocket control frames (Close, Ping, Pong) and data frames (Text and Binary) are passed
to the next handler in the pipeline.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWebSocketServerProtocolHandler(String websocketPath) WebSocketServerProtocolHandler(String websocketPath, String subprotocols) WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidInvoked when an exception was raised by an I/O thread or aChannelHandler.(package private) static ChannelHandler(package private) static WebSocketServerHandshakervoidInvoked when a message object (e.g:ChannelBuffer) was received from a remote peer.(package private) static voidsetHandshaker(ChannelHandlerContext ctx, WebSocketServerHandshaker handshaker) Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
-
Field Details
-
websocketPath
-
subprotocols
-
allowExtensions
private final boolean allowExtensions
-
-
Constructor Details
-
WebSocketServerProtocolHandler
-
WebSocketServerProtocolHandler
-
WebSocketServerProtocolHandler
-
-
Method Details
-
afterAdd
- Specified by:
afterAddin interfaceLifeCycleAwareChannelHandler- Throws:
Exception
-
messageReceived
Description copied from class:SimpleChannelUpstreamHandlerInvoked when a message object (e.g:ChannelBuffer) was received from a remote peer.- Overrides:
messageReceivedin classSimpleChannelUpstreamHandler- Throws:
Exception
-
exceptionCaught
Description copied from class:SimpleChannelUpstreamHandlerInvoked when an exception was raised by an I/O thread or aChannelHandler.- Overrides:
exceptionCaughtin classSimpleChannelUpstreamHandler- Throws:
Exception
-
getHandshaker
-
setHandshaker
-
forbiddenHttpRequestResponder
-
beforeAdd
- Specified by:
beforeAddin interfaceLifeCycleAwareChannelHandler- Throws:
Exception
-
beforeRemove
- Specified by:
beforeRemovein interfaceLifeCycleAwareChannelHandler- Throws:
Exception
-
afterRemove
- Specified by:
afterRemovein interfaceLifeCycleAwareChannelHandler- Throws:
Exception
-