public class SSEHandler extends Object implements TransportHandler, TransportStatistics
HttpPollingHandler
for transmitting messages.EXTRA_URI_PARMS_RESOURCE, UNSUPPORTED_MESSAGE_NO_CLIENT_SUPPORT, UNSUPPORTED_MESSAGE_NO_SERVER_SUPPORT
Constructor and Description |
---|
SSEHandler(ClientMessageBusImpl clientMessageBus) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Permanently closes this transport handler.
|
void |
configure(Message capabilitiesMessage)
Called to configure the transport.
|
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.
|
boolean |
isFullDuplex() |
boolean |
isUsable()
Indicates whether the transport is usable.
|
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. |
public SSEHandler(ClientMessageBusImpl clientMessageBus)
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 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 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 boolean isUsable()
TransportHandler
isUsable
in interface TransportHandler
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 int getMeasuredLatency()
getMeasuredLatency
in interface TransportStatistics
public long getLastTransmissionTime()
getLastTransmissionTime
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
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.