org.codehaus.wadi.gridstate.jgroups
Class JGroupsCluster

java.lang.Object
  extended byorg.codehaus.wadi.gridstate.jgroups.JGroupsCluster
All Implemented Interfaces:
Cluster, Service

public class JGroupsCluster
extends Object
implements Cluster


Constructor Summary
JGroupsCluster()
           
 
Method Summary
 void addClusterListener(ClusterListener listener)
           
 BytesMessage createBytesMessage()
           
 MessageConsumer createConsumer(Destination destination)
           
 MessageConsumer createConsumer(Destination destination, String selector)
           
 MessageConsumer createConsumer(Destination destination, String selector, boolean noLocal)
           
 MapMessage createMapMessage()
           
 Message createMessage()
           
 ObjectMessage createObjectMessage()
           
 ObjectMessage createObjectMessage(Serializable object)
           
 StreamMessage createStreamMessage()
           
 TextMessage createTextMessage()
           
 TextMessage createTextMessage(String text)
           
 Topic getDestination()
           
 LocalNode getLocalNode()
           
 Map getNodes()
           
 void removeClusterListener(ClusterListener listener)
           
 void send(Destination destination, Message message)
           
 void setElectionStrategy(ElectionStrategy strategy)
           
 void start()
           
 void stop()
           
 boolean waitForClusterToComplete(int expectedCount, long timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JGroupsCluster

public JGroupsCluster()
Method Detail

getDestination

public Topic getDestination()
Specified by:
getDestination in interface Cluster

getNodes

public Map getNodes()
Specified by:
getNodes in interface Cluster

addClusterListener

public void addClusterListener(ClusterListener listener)
Specified by:
addClusterListener in interface Cluster

removeClusterListener

public void removeClusterListener(ClusterListener listener)
Specified by:
removeClusterListener in interface Cluster

getLocalNode

public LocalNode getLocalNode()
Specified by:
getLocalNode in interface Cluster

setElectionStrategy

public void setElectionStrategy(ElectionStrategy strategy)

send

public void send(Destination destination,
                 Message message)
          throws JMSException
Specified by:
send in interface Cluster
Throws:
JMSException

createConsumer

public MessageConsumer createConsumer(Destination destination)
                               throws JMSException
Specified by:
createConsumer in interface Cluster
Throws:
JMSException

createConsumer

public MessageConsumer createConsumer(Destination destination,
                                      String selector)
                               throws JMSException
Specified by:
createConsumer in interface Cluster
Throws:
JMSException

createConsumer

public MessageConsumer createConsumer(Destination destination,
                                      String selector,
                                      boolean noLocal)
                               throws JMSException
Specified by:
createConsumer in interface Cluster
Throws:
JMSException

createMessage

public Message createMessage()
                      throws JMSException
Specified by:
createMessage in interface Cluster
Throws:
JMSException

createBytesMessage

public BytesMessage createBytesMessage()
                                throws JMSException
Specified by:
createBytesMessage in interface Cluster
Throws:
JMSException

createMapMessage

public MapMessage createMapMessage()
                            throws JMSException
Specified by:
createMapMessage in interface Cluster
Throws:
JMSException

createObjectMessage

public ObjectMessage createObjectMessage()
                                  throws JMSException
Specified by:
createObjectMessage in interface Cluster
Throws:
JMSException

createObjectMessage

public ObjectMessage createObjectMessage(Serializable object)
                                  throws JMSException
Specified by:
createObjectMessage in interface Cluster
Throws:
JMSException

createStreamMessage

public StreamMessage createStreamMessage()
                                  throws JMSException
Specified by:
createStreamMessage in interface Cluster
Throws:
JMSException

createTextMessage

public TextMessage createTextMessage()
                              throws JMSException
Specified by:
createTextMessage in interface Cluster
Throws:
JMSException

createTextMessage

public TextMessage createTextMessage(String text)
                              throws JMSException
Specified by:
createTextMessage in interface Cluster
Throws:
JMSException

waitForClusterToComplete

public boolean waitForClusterToComplete(int expectedCount,
                                        long timeout)
                                 throws InterruptedException
Specified by:
waitForClusterToComplete in interface Cluster
Throws:
InterruptedException

start

public void start()
           throws JMSException
Specified by:
start in interface Service
Throws:
JMSException

stop

public void stop()
          throws JMSException
Specified by:
stop in interface Service
Throws:
JMSException


Copyright © 2004-2006 Core Developers Network Ltd.. All Rights Reserved.