public class NettyWebSocketClientHandler extends org.jboss.netty.channel.SimpleChannelUpstreamHandler implements WebSocketClient
NettyWebSocketClient for controlling your client.| Constructor and Description |
|---|
NettyWebSocketClientHandler(org.jboss.netty.bootstrap.ClientBootstrap bootstrap,
URI url,
WebSocketActionListener listener) |
| Modifier and Type | Method and Description |
|---|---|
org.jboss.netty.channel.Channel |
channel()
The channel this client has opened.
|
void |
channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent event) |
void |
channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent event) |
org.jboss.netty.channel.ChannelFuture |
connect()
Connect to host and port.
|
org.jboss.netty.channel.ChannelFuture |
disconnect()
Disconnect from the server
|
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e) |
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent event) |
org.jboss.netty.channel.ChannelFuture |
send(org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame frame)
Send data to server
|
public NettyWebSocketClientHandler(org.jboss.netty.bootstrap.ClientBootstrap bootstrap, URI url, WebSocketActionListener listener)
public org.jboss.netty.channel.Channel channel()
WebSocketClientchannel in interface WebSocketClientpublic void channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent event) throws Exception
channelConnected in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerExceptionpublic void channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent event) throws Exception
channelClosed in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerExceptionpublic void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent event) throws Exception
messageReceived in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerExceptionpublic void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e) throws Exception
exceptionCaught in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerExceptionpublic org.jboss.netty.channel.ChannelFuture connect()
WebSocketClientconnect in interface WebSocketClientpublic org.jboss.netty.channel.ChannelFuture disconnect()
WebSocketClientdisconnect in interface WebSocketClientpublic org.jboss.netty.channel.ChannelFuture send(org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame frame)
WebSocketClientsend in interface WebSocketClientframe - Data for sendingCopyright © 2012–2014. All rights reserved.