Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.server.api
Interface ServerMessageBus

All Superinterfaces:
MessageBus
All Known Implementing Classes:
MessageBusProxy, ServerMessageBusImpl

public interface ServerMessageBus
extends MessageBus

This interface, ServerMessageBus, extends the client's MessageBus, and adds functionality so the server can transmit messages to a client and vice versa

Author:
Mike Brock

Method Summary
 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.
 
Methods inherited from interface org.jboss.errai.bus.client.api.messaging.MessageBus
addSubscribeListener, addUnsubscribeListener, attachMonitor, isSubscribed, send, send, sendGlobal, subscribe, subscribeLocal, unsubscribeAll
 

Method Detail

getQueue

MessageQueue getQueue(QueueSession session)
Gets the queue containing the messages that are waiting to be transmitted

Parameters:
session - - the session of the queue
Returns:
the message queue needed

closeQueue

void closeQueue(String sessionId)
Closes the queue associated with the sessionId

Parameters:
sessionId - - the session id of the message queue

closeQueue

void closeQueue(MessageQueue queue)
Closes the specified message queue

Parameters:
queue - - the message queue to close

getScheduler

ExecutorService getScheduler()
Returns the associated scheduler which keeps track of timed events

Returns:
the Scheduler associated with this bus

addQueueClosedListener

void addQueueClosedListener(QueueClosedListener listener)
Register a QueueClosedListener with the bus.

Parameters:
listener - a instance of the listener

configure

void configure(ErraiServiceConfigurator service)
Configures the bus using the configuration specified

Parameters:
service - - the configuration to use

getReceivers

Collection<MessageCallback> getReceivers(String subject)
Get a collection of all receivers registered for a specificed subject

Parameters:
subject - The subject.
Returns:

hasRemoteSubscriptions

boolean hasRemoteSubscriptions(String subject)

hasRemoteSubscription

boolean hasRemoteSubscription(String sessionId,
                              String subject)

getMessageQueues

Map<QueueSession,MessageQueue> getMessageQueues()

getQueueBySession

MessageQueue getQueueBySession(String id)

getSessionBySessionId

QueueSession getSessionBySessionId(String id)

associateNewQueue

void associateNewQueue(QueueSession oldSession,
                       QueueSession newSession)

getDeadLetterMessage

Message getDeadLetterMessage(String messageId)

removeDeadLetterMessage

boolean removeDeadLetterMessage(String messageId)

stop

void stop()
Stop the MessateBus.


Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.