|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ning.http.client.websocket.WebSocketUpgradeHandler
org.atmosphere.wasync.transport.WebSocketTransport
public class WebSocketTransport
WebSocket Transport implementation
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.ning.http.client.websocket.WebSocketUpgradeHandler |
|---|
com.ning.http.client.websocket.WebSocketUpgradeHandler.Builder |
| Nested classes/interfaces inherited from interface com.ning.http.client.AsyncHandler |
|---|
com.ning.http.client.AsyncHandler.STATE |
| Field Summary | |
|---|---|
protected boolean |
protocolEnabled
|
protected boolean |
supportBinary
|
protected java.util.concurrent.ScheduledExecutorService |
timer
|
| Constructor Summary | |
|---|---|
WebSocketTransport(com.ning.http.client.RequestBuilder requestBuilder,
Options options,
Request request,
java.util.List<FunctionWrapper> functions)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the underlying transport} |
void |
connectedFuture(Future f)
Set the Future, which will unlock the Socket.fire(java.lang.Object) method once the connection has been fully established. |
void |
error(java.lang.Throwable t)
Set a Throwable |
boolean |
errorHandled()
Error handled by a Function |
void |
future(Future f)
Set the Future, which can be used to clone the connection. |
Request.TRANSPORT |
name()
The transport name |
com.ning.http.client.AsyncHandler.STATE |
onBodyPartReceived(com.ning.http.client.HttpResponseBodyPart bodyPart)
|
com.ning.http.client.websocket.WebSocket |
onCompleted()
|
void |
onFailure(java.lang.Throwable t)
|
com.ning.http.client.AsyncHandler.STATE |
onHeadersReceived(com.ning.http.client.HttpResponseHeaders headers)
|
com.ning.http.client.AsyncHandler.STATE |
onStatusReceived(com.ning.http.client.HttpResponseStatus responseStatus)
|
void |
onSuccess(com.ning.http.client.websocket.WebSocket webSocket)
|
void |
onThrowable(java.lang.Throwable t)
Called when an unexpected exception ocurred. |
Transport |
registerF(FunctionWrapper function)
Register a new FunctionResolver |
WebSocketTransport |
sendMessage(byte[] message)
|
WebSocketTransport |
sendMessage(java.lang.String message)
|
Socket.STATUS |
status()
Return the current Socket.STATUS |
| Methods inherited from class com.ning.http.client.websocket.WebSocketUpgradeHandler |
|---|
onClose, resetSuccess, touchSuccess |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final boolean protocolEnabled
protected boolean supportBinary
protected final java.util.concurrent.ScheduledExecutorService timer
| Constructor Detail |
|---|
public WebSocketTransport(com.ning.http.client.RequestBuilder requestBuilder,
Options options,
Request request,
java.util.List<FunctionWrapper> functions)
| Method Detail |
|---|
public void onThrowable(java.lang.Throwable t)
onThrowable in interface com.ning.http.client.AsyncHandler<com.ning.http.client.websocket.WebSocket>onThrowable in interface TransportonThrowable in class com.ning.http.client.websocket.WebSocketUpgradeHandlert - a Throwablepublic void close()
close in interface Transportpublic Socket.STATUS status()
Socket.STATUS
status in interface Transportpublic boolean errorHandled()
Function
errorHandled in interface Transportpublic void error(java.lang.Throwable t)
Throwable
error in interface Transportt - Throwablepublic void future(Future f)
Future, which can be used to clone the connection.
future in interface Transportf - Futurepublic void connectedFuture(Future f)
TransportFuture, which will unlock the Socket.fire(java.lang.Object) method once the connection has been fully established.
connectedFuture in interface Transportf - Future
public com.ning.http.client.AsyncHandler.STATE onBodyPartReceived(com.ning.http.client.HttpResponseBodyPart bodyPart)
throws java.lang.Exception
onBodyPartReceived in interface com.ning.http.client.AsyncHandler<com.ning.http.client.websocket.WebSocket>onBodyPartReceived in class com.ning.http.client.websocket.WebSocketUpgradeHandlerjava.lang.Exception
public com.ning.http.client.AsyncHandler.STATE onStatusReceived(com.ning.http.client.HttpResponseStatus responseStatus)
throws java.lang.Exception
onStatusReceived in interface com.ning.http.client.AsyncHandler<com.ning.http.client.websocket.WebSocket>onStatusReceived in class com.ning.http.client.websocket.WebSocketUpgradeHandlerjava.lang.Exception
public com.ning.http.client.AsyncHandler.STATE onHeadersReceived(com.ning.http.client.HttpResponseHeaders headers)
throws java.lang.Exception
onHeadersReceived in interface com.ning.http.client.AsyncHandler<com.ning.http.client.websocket.WebSocket>onHeadersReceived in class com.ning.http.client.websocket.WebSocketUpgradeHandlerjava.lang.Exception
public com.ning.http.client.websocket.WebSocket onCompleted()
throws java.lang.Exception
onCompleted in interface com.ning.http.client.AsyncHandler<com.ning.http.client.websocket.WebSocket>onCompleted in class com.ning.http.client.websocket.WebSocketUpgradeHandlerjava.lang.Exceptionpublic void onSuccess(com.ning.http.client.websocket.WebSocket webSocket)
onSuccess in interface com.ning.http.client.UpgradeHandler<com.ning.http.client.websocket.WebSocket>onSuccess in class com.ning.http.client.websocket.WebSocketUpgradeHandlerpublic Request.TRANSPORT name()
name in interface Transportpublic Transport registerF(FunctionWrapper function)
FunctionResolver
registerF in interface Transportfunction - FunctionResolver
public final void onFailure(java.lang.Throwable t)
onFailure in interface com.ning.http.client.UpgradeHandler<com.ning.http.client.websocket.WebSocket>onFailure in class com.ning.http.client.websocket.WebSocketUpgradeHandlerpublic WebSocketTransport sendMessage(java.lang.String message)
public WebSocketTransport sendMessage(byte[] message)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||