public interface ServerMessageBus extends MessageBus
MessageBus
,
and adds functionality so the server can transmit messages to a client and vice versaModifier and Type | Method and Description |
---|---|
void |
addQueueClosedListener(QueueClosedListener listener)
Register a
QueueClosedListener with the bus. |
void |
associateNewQueue(QueueSession oldSession,
QueueSession newSession) |
void |
closeQueue(MessageQueue queue)
Closes the specified message queue
|
void |
closeQueue(String sessionId)
Closes the queue associated with the sessionId
|
void |
configure(ErraiServiceConfigurator service)
Configures the bus using the configuration specified
|
Message |
getDeadLetterMessage(String messageId) |
Map<QueueSession,MessageQueue> |
getMessageQueues() |
MessageQueue |
getQueue(QueueSession session)
Gets the queue containing the messages that are waiting to be transmitted
|
MessageQueue |
getQueueBySession(String id) |
Collection<MessageCallback> |
getReceivers(String subject)
Get a collection of all receivers registered for a specificed subject
|
ExecutorService |
getScheduler()
Returns the associated scheduler which keeps track of timed events
|
QueueSession |
getSessionBySessionId(String id) |
boolean |
hasRemoteSubscription(String sessionId,
String subject) |
boolean |
hasRemoteSubscriptions(String subject) |
boolean |
removeDeadLetterMessage(String messageId) |
void |
stop()
Stop the MessateBus.
|
addSubscribeListener, addUnsubscribeListener, attachMonitor, isSubscribed, send, send, sendGlobal, subscribe, subscribeLocal, unsubscribeAll
MessageQueue getQueue(QueueSession session)
session
- - the session of the queuevoid closeQueue(String sessionId)
sessionId
- - the session id of the message queuevoid closeQueue(MessageQueue queue)
queue
- - the message queue to closeExecutorService getScheduler()
void addQueueClosedListener(QueueClosedListener listener)
QueueClosedListener
with the bus.listener
- a instance of the listenervoid configure(ErraiServiceConfigurator service)
service
- - the configuration to useCollection<MessageCallback> getReceivers(String subject)
subject
- The subject.boolean hasRemoteSubscriptions(String subject)
Map<QueueSession,MessageQueue> getMessageQueues()
MessageQueue getQueueBySession(String id)
QueueSession getSessionBySessionId(String id)
void associateNewQueue(QueueSession oldSession, QueueSession newSession)
boolean removeDeadLetterMessage(String messageId)
void stop()
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.