Package org.uberfire.commons.cluster
Class ClusterJMSService
- java.lang.Object
-
- org.uberfire.commons.cluster.ClusterJMSService
-
- All Implemented Interfaces:
ClusterService
public class ClusterJMSService extends Object implements ClusterService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClusterJMSService.JMSExceptionListener-
Nested classes/interfaces inherited from interface org.uberfire.commons.cluster.ClusterService
ClusterService.DestinationType
-
-
Constructor Summary
Constructors Constructor Description ClusterJMSService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbroadcast(ClusterService.DestinationType type, String channel, Serializable object)voidclose()voidconnect()<T> voidcreateConsumer(ClusterService.DestinationType type, String channel, Class<T> objectMessageClass, Consumer<T> listener)protected javax.jms.SessioncreateConsumerSession()protected javax.jms.DestinationcreateDestination(ClusterService.DestinationType type, String channel, javax.jms.Session session)booleanisAppFormerClustered()
-
-
-
Method Detail
-
connect
public void connect()
- Specified by:
connectin interfaceClusterService
-
createConsumer
public <T> void createConsumer(ClusterService.DestinationType type, String channel, Class<T> objectMessageClass, Consumer<T> listener)
- Specified by:
createConsumerin interfaceClusterService
-
broadcast
public void broadcast(ClusterService.DestinationType type, String channel, Serializable object)
- Specified by:
broadcastin interfaceClusterService
-
createDestination
protected javax.jms.Destination createDestination(ClusterService.DestinationType type, String channel, javax.jms.Session session) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
createConsumerSession
protected javax.jms.Session createConsumerSession()
-
isAppFormerClustered
public boolean isAppFormerClustered()
- Specified by:
isAppFormerClusteredin interfaceClusterService
-
close
public void close()
- Specified by:
closein interfaceClusterService
-
-