Package org.atmosphere.plugin.jms
Class JMSFilter
- java.lang.Object
-
- org.atmosphere.plugin.jms.JMSFilter
-
- All Implemented Interfaces:
org.atmosphere.cpr.BroadcastFilter,org.atmosphere.cpr.BroadcastFilterLifecycle,org.atmosphere.cpr.ClusterBroadcastFilter
public class JMSFilter extends java.lang.Object implements org.atmosphere.cpr.ClusterBroadcastFilterClustering support based on JMS- Author:
- Jean-francois Arcand
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()org.atmosphere.cpr.BroadcastFilter.BroadcastActionfilter(java.lang.String broadcasterId, java.lang.Object originalMessage, java.lang.Object o)Every time a message gets broadcasted, make sure we update the cluster.org.atmosphere.cpr.BroadcastergetBroadcaster()Return the currentBroadcastervoidinit(org.atmosphere.cpr.AtmosphereConfig config)Preapre the cluter.voidsetBroadcaster(org.atmosphere.cpr.Broadcaster bc)Set the currentBroadcasterto use when a cluster event happens.voidsetUri(java.lang.String clusterName)
-
-
-
Constructor Detail
-
JMSFilter
public JMSFilter()
-
JMSFilter
public JMSFilter(org.atmosphere.cpr.Broadcaster bc)
Create a JMSFilter based filter.- Parameters:
bc- the Broadcaster to use when receiving update from the cluster.
-
JMSFilter
public JMSFilter(org.atmosphere.cpr.Broadcaster bc, java.lang.String topicId)Create a JMSFilter based filter.- Parameters:
bc- the Broadcaster to use when receiving update from the cluster.topicId- the topic id
-
-
Method Detail
-
setUri
public void setUri(java.lang.String clusterName)
- Specified by:
setUriin interfaceorg.atmosphere.cpr.ClusterBroadcastFilter
-
init
public void init(org.atmosphere.cpr.AtmosphereConfig config)
Preapre the cluter.- Specified by:
initin interfaceorg.atmosphere.cpr.BroadcastFilterLifecycle
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.atmosphere.cpr.BroadcastFilterLifecycle
-
filter
public org.atmosphere.cpr.BroadcastFilter.BroadcastAction filter(java.lang.String broadcasterId, java.lang.Object originalMessage, java.lang.Object o)Every time a message gets broadcasted, make sure we update the cluster.- Specified by:
filterin interfaceorg.atmosphere.cpr.BroadcastFilter- Parameters:
o- the message to broadcast.- Returns:
- The same message.
-
getBroadcaster
public org.atmosphere.cpr.Broadcaster getBroadcaster()
Return the currentBroadcaster- Specified by:
getBroadcasterin interfaceorg.atmosphere.cpr.ClusterBroadcastFilter
-
setBroadcaster
public void setBroadcaster(org.atmosphere.cpr.Broadcaster bc)
Set the currentBroadcasterto use when a cluster event happens.- Specified by:
setBroadcasterin interfaceorg.atmosphere.cpr.ClusterBroadcastFilter- Parameters:
bc-
-
-