|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for CB2 Broadcast Messaging provider implementations.
CB2 Broadcast Messaging subsystem (the BCM), supported by the application
context, helps building server clusters providing means for sending
broadcast messages to application instances in the cluster. A BCM provider
is an object behind application context's broadcastBCMMessage
method, and that is the provider, which actually does all the work of the
delivery of messages to the cluster members.
When provider receives a message for the local instance, it should call
processBCMMessage
on the application context to deliver it to
the appropriate BCM terminal.
The provider implementation used by the application context is specified
by com.boylesoftware.cb2.broadcastMessaging.provider.class
application property.
CB2 has several BCM provider implementations packaged with it - see
com.boylesoftware.cb2.bcmproviders.*
packages.
ApplicationContext.broadcastBCMMessage(java.lang.String, java.io.Serializable)
,
ApplicationContext.processBCMMessage(java.lang.String, java.lang.String, java.io.Serializable)
Field Summary | |
static java.lang.String |
LOG_SUBSYS
Channel for the logger. |
Method Summary | |
void |
broadcastMessage(java.lang.String channelName,
java.io.Serializable messageParam)
Makes the provider to broadcast a message to all registered instances in the cluster including the local instance. |
void |
destroy()
Destroys the provider and frees any used resources. |
void |
init(ApplicationContext appCtx)
Initializes the provider. |
Field Detail |
public static final java.lang.String LOG_SUBSYS
Method Detail |
public void init(ApplicationContext appCtx) throws ApplicationException
appCtx
- reference to the application context.
ApplicationException
- if a serious error happens, the provider
cannot be initialized and the application should shut down itself.public void destroy()
public void broadcastMessage(java.lang.String channelName, java.io.Serializable messageParam)
channelName
- name of the channel, to which the message is
targeted.messageParam
- optional general purpose message parameter, may be
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |