public class GrizzlyClientSocket extends Object implements WebSocket, TyrusClientSocket
ABNORMAL_CLOSE, END_POINT_GOING_DOWN, INVALID_DATA, MESSAGE_TOO_LARGE, NO_STATUS_CODE, NORMAL_CLOSURE, PROTOCOL_ERROR| Constructor and Description |
|---|
GrizzlyClientSocket(URI uri,
javax.websocket.ClientEndpointConfig configuration,
long timeoutMs,
SPIHandshakeListener listener,
org.glassfish.grizzly.ssl.SSLEngineConfigurator clientSSLEngineConfigurator)
Create new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(WebSocketListener webSocketListener) |
void |
addEndpoint(SPIEndpoint endpoint)
Add new SPI_Endpoint to the socket.
|
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(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(DataFrame dataFrame) |
void |
onPong(DataFrame dataFrame) |
boolean |
remove(WebSocketListener webSocketListener) |
Future<DataFrame> |
send(byte[] bytes) |
Future<DataFrame> |
send(String s) |
Future<DataFrame> |
sendPing(byte[] bytes) |
Future<DataFrame> |
sendPong(byte[] bytes) |
Future<DataFrame> |
stream(boolean b,
byte[] bytes,
int i,
int i1) |
Future<DataFrame> |
stream(boolean b,
String s) |
public GrizzlyClientSocket(URI uri, javax.websocket.ClientEndpointConfig configuration, long timeoutMs, 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 void addEndpoint(SPIEndpoint endpoint)
endpoint - to be added.public void close()
close in interface TyrusClientSocketclose in interface WebSocketpublic javax.websocket.Session getSession()
getSession in interface TyrusClientSocketpublic boolean isConnected()
isConnected in interface WebSocketpublic void onFragment(boolean b,
String s)
onFragment in interface WebSocketpublic void onFragment(boolean bool,
byte[] bytes)
onFragment in interface WebSocketpublic void onClose(ClosingFrame dataFrame)
public boolean add(WebSocketListener webSocketListener)
public boolean remove(WebSocketListener webSocketListener)
Copyright © 2012-2013. All Rights Reserved.