|
Cumulus4j API (1.0.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.store.crypto.keymanager.messagebroker.MessageBrokerRegistry
public class MessageBrokerRegistry
JVM-singleton to access the active message-broker
.
It handles the registration and instantiation of MessageBroker
implementations.
Field Summary | |
---|---|
static String |
SYSTEM_PROPERTY_ACTIVE_MESSAGE_BROKER
The system property configuring which message-broker-implementation is to be used. |
Constructor Summary | |
---|---|
MessageBrokerRegistry()
|
Method Summary | |
---|---|
MessageBroker |
getActiveMessageBroker()
Get the active MessageBroker . |
void |
setActiveMessageBroker(MessageBroker messageBroker)
Set the active MessageBroker . |
static MessageBrokerRegistry |
sharedInstance()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SYSTEM_PROPERTY_ACTIVE_MESSAGE_BROKER
Constructor Detail |
---|
public MessageBrokerRegistry()
Method Detail |
---|
public static MessageBrokerRegistry sharedInstance()
public MessageBroker getActiveMessageBroker()
MessageBroker
. All Message
s are transmitted over this active instance.
If there is no active MessageBroker
, yet, this method will
check the system property "cumulus4j.MessageBrokerRegistry.activeMessageBroker" and either instantiate the
class configured there or iterate a list of known MessageBroker
-implementation-classes.
MessageBroker
; never null
. If no active message-broker is set
and none can be instantiated, an exception is thrown.public void setActiveMessageBroker(MessageBroker messageBroker)
MessageBroker
. Whatever is passed here will be returned by getActiveMessageBroker()
except for null
. Setting null
will cause getActiveMessageBroker()
to perform
a re-initialisation (i.e. instantiate a MessageBroker
as needed).
messageBroker
- the MessageBroker
instance to be set or null
to clear the current one.
|
Cumulus4j API (1.0.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |