|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.oscache.plugins.clustersupport.AbstractBroadcastingListener
com.opensymphony.oscache.plugins.clustersupport.JMS10BroadcastingListener
public class JMS10BroadcastingListener
A JMS 1.0.x based clustering implementation. This implementation is independent of the JMS provider and uses non-persistent messages on a publish subscribe protocol.
Field Summary | |
---|---|
private String |
clusterNode
The name of this cluster. |
private javax.jms.TopicConnection |
connection
The JMS connection used |
private static org.apache.commons.logging.Log |
log
|
private javax.jms.TopicPublisher |
publisher
Th object used to publish new messages |
private javax.jms.TopicSession |
publisherSession
The current JMS session |
Fields inherited from class com.opensymphony.oscache.plugins.clustersupport.AbstractBroadcastingListener |
---|
cache, CLUSTER_ORIGIN |
Constructor Summary | |
---|---|
JMS10BroadcastingListener()
|
Method Summary | |
---|---|
void |
finialize()
Called by the cache administrator class when a cache is destroyed. |
void |
initialize(Cache cache,
Config config)
Called by the cache administrator class when a cache is instantiated. |
protected void |
sendNotification(ClusterNotification message)
Called when a cluster notification message is to be broadcast. |
Methods inherited from class com.opensymphony.oscache.plugins.clustersupport.AbstractBroadcastingListener |
---|
cacheEntryAdded, cacheEntryFlushed, cacheEntryRemoved, cacheEntryUpdated, cacheFlushed, cacheGroupAdded, cacheGroupEntryAdded, cacheGroupEntryRemoved, cacheGroupFlushed, cacheGroupRemoved, cacheGroupUpdated, cachePatternFlushed, handleClusterNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private String clusterNode
private javax.jms.TopicConnection connection
private javax.jms.TopicPublisher publisher
private javax.jms.TopicSession publisherSession
Constructor Detail |
---|
public JMS10BroadcastingListener()
Method Detail |
---|
public void initialize(Cache cache, Config config) throws InitializationException
Called by the cache administrator class when a cache is instantiated.
The JMS broadcasting implementation requires the following configuration
properties to be specified in oscache.properties
:
initialize
in interface LifecycleAware
initialize
in class AbstractBroadcastingListener
cache
- the cache instance that this listener is attached to.config
- The cache's configuration details. This allows the event handler
to initialize itself based on the cache settings, and also to receive additional
settings that were part of the cache configuration but that the cache
itself does not care about. If you are using cache.properties
for your configuration, simply add any additional properties that your event
handler requires and they will be passed through in this parameter.
InitializationException
- thrown when there was a
problem initializing the listener. The cache administrator will log this error and
disable the listener.public void finialize() throws FinalizationException
FinalizationException
- thrown when there was a problem finalizing the
listener. The cache administrator will catch and log this error.protected void sendNotification(ClusterNotification message)
AbstractBroadcastingListener
sendNotification
in class AbstractBroadcastingListener
message
- The notification message to broadcast.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |