org.mactor.brokers
Class MessageBrokerManager

java.lang.Object
  extended by org.mactor.brokers.MessageBrokerManager

public class MessageBrokerManager
extends java.lang.Object

Singleton that loads and maintains all message brokers. And works as a facade to the message brokers (hiding the broker-channel association).

Author:
Lars Ivar Almli

Nested Class Summary
static class MessageBrokerManager.MessageInfo
           
static interface MessageBrokerManager.MessageInfoListener
           
 
Field Summary
protected static org.apache.log4j.Logger log
           
 
Method Summary
 void addMessageInfoListener(MessageBrokerManager.MessageInfoListener listener)
           
 void addMessageInfoListener(java.lang.String channel, MessageBrokerManager.MessageInfoListener listener)
           
 void clearArchive(java.lang.String channel)
           
static MessageBrokerManager getInstance()
           
static boolean isActive()
           
 java.util.ArrayList<MessageBrokerManager.MessageInfo> loadMessageInfoFromArchive(java.lang.String channel)
           
 Message publish(java.lang.String channel, Message message)
           
 void removeMessageInfoListener(java.lang.String channel, MessageBrokerManager.MessageInfoListener listener)
           
 void subscribe(java.lang.String channel, MessageSubscriber subscriber, MessageSelectorCommand messageSelector)
           
 void terminate()
           
 void unsubscribe(java.lang.String channel, MessageSubscriber subscriber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
Method Detail

getInstance

public static MessageBrokerManager getInstance()
                                        throws MactorException
Throws:
MactorException

isActive

public static boolean isActive()

terminate

public void terminate()

addMessageInfoListener

public void addMessageInfoListener(MessageBrokerManager.MessageInfoListener listener)
                            throws MactorException
Throws:
MactorException

addMessageInfoListener

public void addMessageInfoListener(java.lang.String channel,
                                   MessageBrokerManager.MessageInfoListener listener)
                            throws MactorException
Throws:
MactorException

removeMessageInfoListener

public void removeMessageInfoListener(java.lang.String channel,
                                      MessageBrokerManager.MessageInfoListener listener)
                               throws MactorException
Throws:
MactorException

publish

public Message publish(java.lang.String channel,
                       Message message)
                throws MactorException
Throws:
MactorException

subscribe

public void subscribe(java.lang.String channel,
                      MessageSubscriber subscriber,
                      MessageSelectorCommand messageSelector)
               throws MactorException
Throws:
MactorException

unsubscribe

public void unsubscribe(java.lang.String channel,
                        MessageSubscriber subscriber)
                 throws MactorException
Throws:
MactorException

loadMessageInfoFromArchive

public java.util.ArrayList<MessageBrokerManager.MessageInfo> loadMessageInfoFromArchive(java.lang.String channel)
                                                                                 throws MactorException
Throws:
MactorException

clearArchive

public void clearArchive(java.lang.String channel)
                  throws MactorException
Throws:
MactorException


Copyright © 2008. All Rights Reserved.