public class GrizzlyClientSocket extends Object implements org.glassfish.tyrus.websockets.WebSocket, org.glassfish.tyrus.spi.TyrusClientSocket
| Constructor and Description |
|---|
GrizzlyClientSocket(org.glassfish.tyrus.spi.SPIEndpoint endpoint,
URI uri,
javax.websocket.ClientEndpointConfig configuration,
long timeoutMs,
org.glassfish.tyrus.spi.SPIHandshakeListener listener,
org.glassfish.grizzly.ssl.SSLEngineConfigurator clientSSLEngineConfigurator)
Create new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(org.glassfish.tyrus.websockets.WebSocketListener webSocketListener) |
void |
close() |
void |
close(int i) |
void |
close(int i,
String s) |
void |
connect()
Connects to the given
URI. |
javax.websocket.Session |
getSession() |
boolean |
isConnected() |
void |
onClose(org.glassfish.tyrus.websockets.draft06.ClosingFrame dataFrame) |
void |
onConnect() |
void |
onFragment(boolean bool,
byte[] bytes) |
void |
onFragment(boolean b,
String s) |
void |
onMessage(byte[] bytes) |
void |
onMessage(String message) |
void |
onPing(org.glassfish.tyrus.websockets.DataFrame dataFrame) |
void |
onPong(org.glassfish.tyrus.websockets.DataFrame dataFrame) |
boolean |
remove(org.glassfish.tyrus.websockets.WebSocketListener webSocketListener) |
Future<org.glassfish.tyrus.websockets.DataFrame> |
send(byte[] bytes) |
Future<org.glassfish.tyrus.websockets.DataFrame> |
send(String s) |
Future<org.glassfish.tyrus.websockets.DataFrame> |
sendPing(byte[] bytes) |
Future<org.glassfish.tyrus.websockets.DataFrame> |
sendPong(byte[] bytes) |
void |
setWriteTimeout(long timeoutMs) |
Future<org.glassfish.tyrus.websockets.DataFrame> |
stream(boolean b,
byte[] bytes,
int i,
int i1) |
Future<org.glassfish.tyrus.websockets.DataFrame> |
stream(boolean b,
String s) |
public GrizzlyClientSocket(org.glassfish.tyrus.spi.SPIEndpoint endpoint,
URI uri,
javax.websocket.ClientEndpointConfig configuration,
long timeoutMs,
org.glassfish.tyrus.spi.SPIHandshakeListener listener,
org.glassfish.grizzly.ssl.SSLEngineConfigurator clientSSLEngineConfigurator)
uri - endpoint address.configuration - client endpoint configuration.timeoutMs - TODOlistener - listener called when response is received.clientSSLEngineConfigurator - ssl engine configuratorpublic void connect()
URI.public Future<org.glassfish.tyrus.websockets.DataFrame> send(String s)
send in interface org.glassfish.tyrus.websockets.WebSocketpublic Future<org.glassfish.tyrus.websockets.DataFrame> send(byte[] bytes)
send in interface org.glassfish.tyrus.websockets.WebSocketpublic Future<org.glassfish.tyrus.websockets.DataFrame> sendPing(byte[] bytes)
sendPing in interface org.glassfish.tyrus.websockets.WebSocketpublic Future<org.glassfish.tyrus.websockets.DataFrame> sendPong(byte[] bytes)
sendPong in interface org.glassfish.tyrus.websockets.WebSocketpublic Future<org.glassfish.tyrus.websockets.DataFrame> stream(boolean b, String s)
stream in interface org.glassfish.tyrus.websockets.WebSocketpublic Future<org.glassfish.tyrus.websockets.DataFrame> stream(boolean b, byte[] bytes, int i, int i1)
stream in interface org.glassfish.tyrus.websockets.WebSocketpublic void close()
close in interface org.glassfish.tyrus.spi.TyrusClientSocketclose in interface org.glassfish.tyrus.websockets.WebSocketpublic javax.websocket.Session getSession()
getSession in interface org.glassfish.tyrus.spi.TyrusClientSocketpublic void close(int i)
close in interface org.glassfish.tyrus.websockets.WebSocketpublic void close(int i,
String s)
close in interface org.glassfish.tyrus.websockets.WebSocketpublic boolean isConnected()
isConnected in interface org.glassfish.tyrus.websockets.WebSocketpublic void onConnect()
onConnect in interface org.glassfish.tyrus.websockets.WebSocketpublic void onMessage(String message)
onMessage in interface org.glassfish.tyrus.websockets.WebSocketpublic void onMessage(byte[] bytes)
onMessage in interface org.glassfish.tyrus.websockets.WebSocketpublic void onFragment(boolean b,
String s)
onFragment in interface org.glassfish.tyrus.websockets.WebSocketpublic void onFragment(boolean bool,
byte[] bytes)
onFragment in interface org.glassfish.tyrus.websockets.WebSocketpublic void onClose(org.glassfish.tyrus.websockets.draft06.ClosingFrame dataFrame)
onClose in interface org.glassfish.tyrus.websockets.WebSocketpublic void onPing(org.glassfish.tyrus.websockets.DataFrame dataFrame)
onPing in interface org.glassfish.tyrus.websockets.WebSocketpublic void onPong(org.glassfish.tyrus.websockets.DataFrame dataFrame)
onPong in interface org.glassfish.tyrus.websockets.WebSocketpublic boolean add(org.glassfish.tyrus.websockets.WebSocketListener webSocketListener)
add in interface org.glassfish.tyrus.websockets.WebSocketpublic boolean remove(org.glassfish.tyrus.websockets.WebSocketListener webSocketListener)
remove in interface org.glassfish.tyrus.websockets.WebSocketpublic void setWriteTimeout(long timeoutMs)
setWriteTimeout in interface org.glassfish.tyrus.websockets.WebSocketCopyright © 2012-2013. All Rights Reserved.