Modifier and Type | Class and Description |
---|---|
private static class |
WebSocketTransport.ClientSockJsWebSocketHandler |
Modifier and Type | Field and Description |
---|---|
private static Log |
logger |
private boolean |
running |
private WebSocketClient |
webSocketClient |
Constructor and Description |
---|
WebSocketTransport(WebSocketClient webSocketClient) |
Modifier and Type | Method and Description |
---|---|
ListenableFuture<WebSocketSession> |
connect(TransportRequest request,
WebSocketHandler handler)
Connect the transport.
|
java.util.List<TransportType> |
getTransportTypes()
Return the SockJS transport types that this transport can be used for.
|
WebSocketClient |
getWebSocketClient()
Return the configured
WebSocketClient . |
boolean |
isRunning()
Check whether this component is currently running.
|
void |
start()
Start this component.
|
void |
stop()
Stop this component, typically in a synchronous fashion, such that
the component is fully stopped upon return of this method.
|
java.lang.String |
toString() |
private static Log logger
private final WebSocketClient webSocketClient
private volatile boolean running
public WebSocketTransport(WebSocketClient webSocketClient)
public WebSocketClient getWebSocketClient()
WebSocketClient
.public java.util.List<TransportType> getTransportTypes()
Transport
XhrTransport
could do both.getTransportTypes
in interface Transport
public ListenableFuture<WebSocketSession> connect(TransportRequest request, WebSocketHandler handler)
Transport
public void start()
Lifecycle
In the case of a container, this will propagate the start signal to all components that apply.
public void stop()
Lifecycle
SmartLifecycle
and its stop(Runnable)
variant in cases where asynchronous stop behavior is necessary.
Should not throw an exception if the component isn't started yet.
In the case of a container, this will propagate the stop signal to all components that apply.
stop
in interface Lifecycle
SmartLifecycle.stop(Runnable)
public boolean isRunning()
Lifecycle
In the case of a container, this will return true
only if all components that apply are currently running.
public java.lang.String toString()
toString
in class java.lang.Object