@StampyLibrary(libraryName="stampy-client-server") public abstract class AbstractConnectedMessageListener<CLNT extends AbstractStampyMessageGateway> extends java.lang.Object implements StampyMessageListener
StompMessageType.CONNECTED from a
STOMP 1.2 server and starts a heartbeat, if requested.
CONNECT heart-beat:[cx],[cy] StampyHeartbeatContainer,
PaceMaker| Constructor and Description |
|---|
AbstractConnectedMessageListener() |
| Modifier and Type | Method and Description |
|---|---|
CLNT |
getGateway()
Gets the message gateway.
|
StampyHeartbeatContainer |
getHeartbeatContainer()
Gets the heartbeat container.
|
StompMessageType[] |
getMessageTypes()
Gets the message types of which the implementation is interested.
|
boolean |
isForMessage(StampyMessage<?> message)
Returns true if the message should be processed by the implementation.
|
void |
messageReceived(StampyMessage<?> message,
HostPort hostPort)
Invoked when the type and the message are to be processed by the
implementation.
|
void |
setGateway(CLNT gateway)
Inject the client
AbstractStampyMessageGateway on system startup. |
void |
setHeartbeatContainer(StampyHeartbeatContainer heartbeatContainer)
Inject the
HeartbeatContainer on system startup. |
public StompMessageType[] getMessageTypes()
StampyMessageListenergetMessageTypes in interface StampyMessageListenerpublic boolean isForMessage(StampyMessage<?> message)
StampyMessageListenerisForMessage in interface StampyMessageListenermessage - the messagepublic void messageReceived(StampyMessage<?> message, HostPort hostPort) throws java.lang.Exception
StampyMessageListenermessageReceived in interface StampyMessageListenermessage - the messagehostPort - the host portjava.lang.Exception - the exceptionpublic StampyHeartbeatContainer getHeartbeatContainer()
public void setHeartbeatContainer(StampyHeartbeatContainer heartbeatContainer)
HeartbeatContainer on system startup.heartbeatContainer - the new heartbeat containerpublic CLNT getGateway()
public void setGateway(CLNT gateway)
AbstractStampyMessageGateway on system startup.gateway - the new message gateway