|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.bus.client.framework.transports.WebsocketHandler
public class WebsocketHandler
Field Summary |
---|
Fields inherited from interface org.jboss.errai.bus.client.framework.transports.TransportHandler |
---|
EXTRA_URI_PARMS_RESOURCE, UNSUPPORTED_MESSAGE_NO_CLIENT_SUPPORT, UNSUPPORTED_MESSAGE_NO_SERVER_SUPPORT |
Constructor Summary | |
---|---|
WebsocketHandler(ClientMessageBusImpl messageBus)
|
Method Summary | |
---|---|
void |
attachWebSocketChannel(Object o)
|
Object |
attemptWebSocketConnect(String websocketAddr)
|
void |
close()
Permanently closes this transport handler. |
void |
configure(Message capabilitiesMessage)
Called to configure the transport. |
void |
disconnectSocket(Object channel)
|
long |
getConnectedTime()
|
long |
getLastTransmissionTime()
|
int |
getMeasuredLatency()
|
int |
getMessagesReceived()
|
int |
getMessagesSent()
|
int |
getPendingMessages()
|
String |
getRxEndpoint()
|
TransportStatistics |
getStatistics()
Returns the TransportStatistics instance. |
String |
getTransportDescription()
|
String |
getTxEndpoint()
|
String |
getUnsupportedDescription()
|
void |
handleProtocolExtension(Message message)
Allows extension to the standard ErraiBus Protocol by optionally handling any unknown protocol verbs from the wire. |
static boolean |
isConnected(Object socket)
|
boolean |
isFullDuplex()
|
boolean |
isUsable()
Indicates whether the transport is usable. |
static boolean |
isWebSocketSupported()
|
void |
start()
Called to start the transport. |
Collection<Message> |
stop(boolean stopAllCurrentRequests)
Called to stop the transport. |
String |
toString()
|
void |
transmit(List<Message> txMessages)
Transmits the specified list of Message to the remote bus over the transport. |
boolean |
transmitToSocket(Object socket,
String text)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WebsocketHandler(ClientMessageBusImpl messageBus)
Method Detail |
---|
public void configure(Message capabilitiesMessage)
TransportHandler
configure
in interface TransportHandler
capabilitiesMessage
- the capabilities message from the message bus on handshake.public void start()
TransportHandler
start
in interface TransportHandler
public void transmit(List<Message> txMessages)
TransportHandler
Message
to the remote bus over the transport.
transmit
in interface TransportHandler
txMessages
- a list of Message
to be transmitted.public void handleProtocolExtension(Message message)
TransportHandler
handleProtocolExtension
in interface TransportHandler
public Collection<Message> stop(boolean stopAllCurrentRequests)
TransportHandler
stop
in interface TransportHandler
stopAllCurrentRequests
- specifying true will cause any in-flight messages which have not returned to be immediately
cancelled.
public boolean isUsable()
TransportHandler
isUsable
in interface TransportHandler
public void attachWebSocketChannel(Object o)
public String toString()
toString
in class Object
public void disconnectSocket(Object channel)
public static boolean isWebSocketSupported()
public Object attemptWebSocketConnect(String websocketAddr)
public boolean transmitToSocket(Object socket, String text)
public static boolean isConnected(Object socket)
public TransportStatistics getStatistics()
TransportHandler
TransportStatistics
instance.
getStatistics
in interface TransportHandler
public String getTransportDescription()
getTransportDescription
in interface TransportStatistics
public String getUnsupportedDescription()
getUnsupportedDescription
in interface TransportStatistics
public int getMessagesSent()
getMessagesSent
in interface TransportStatistics
public int getMessagesReceived()
getMessagesReceived
in interface TransportStatistics
public long getConnectedTime()
getConnectedTime
in interface TransportStatistics
public long getLastTransmissionTime()
getLastTransmissionTime
in interface TransportStatistics
public int getMeasuredLatency()
getMeasuredLatency
in interface TransportStatistics
public boolean isFullDuplex()
isFullDuplex
in interface TransportStatistics
public String getRxEndpoint()
getRxEndpoint
in interface TransportStatistics
public String getTxEndpoint()
getTxEndpoint
in interface TransportStatistics
public int getPendingMessages()
getPendingMessages
in interface TransportStatistics
public void close()
TransportHandler
close
in interface TransportHandler
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |