org.codehaus.wadi.gridstate
Interface Dispatcher

All Known Implementing Classes:
AbstractDispatcher

public interface Dispatcher


Nested Class Summary
static interface Dispatcher.InternalDispatcher
           
 
Method Summary
 ObjectMessage attemptRendezVous(String correlationId, Quipu rv, long timeout)
           
 ObjectMessage createObjectMessage()
           
 boolean deregister(String methodName, Class type, int timeout)
           
 ObjectMessage exchangeReply(ObjectMessage message, Serializable body, long timeout)
           
 ObjectMessage exchangeReplyLoop(ObjectMessage message, Serializable body, long timeout)
           
 ObjectMessage exchangeSend(Destination from, Destination to, Serializable body, long timeout)
           
 ObjectMessage exchangeSend(Destination from, Destination to, Serializable body, long timeout, String targetCorrelationId)
           
 ObjectMessage exchangeSend(Destination from, Destination to, String outgoingCorrelationId, Serializable body, long timeout)
           
 ObjectMessage exchangeSendLoop(Destination from, Destination to, Serializable body, long timeout, int iterations)
           
 boolean forward(ObjectMessage message, Destination destination)
           
 boolean forward(ObjectMessage message, Destination destination, Serializable body)
           
 Destination getClusterDestination()
           
 Map getDistributedState()
           
 PooledExecutor getExecutor()
           
 long getInactiveTime()
           
 String getIncomingCorrelationId(ObjectMessage message)
           
 Destination getLocalDestination()
           
 String getNodeName()
           
 String getNodeName(Destination destination)
           
 int getNumNodes()
           
 String getOutgoingCorrelationId(ObjectMessage message)
           
 Map getRendezVousMap()
           
 void init(DispatcherConfig config)
           
 boolean newDeregister(String methodName, Class type, int timeout)
           
 Dispatcher.InternalDispatcher newRegister(Object target, String methodName, Class type)
           
 String nextCorrelationId()
           
 void register(Class type, long timeout)
           
 Dispatcher.InternalDispatcher register(Object target, String methodName, Class type)
           
 boolean reply(Destination from, Destination to, String incomingCorrelationId, Serializable body)
           
 boolean reply(ObjectMessage message, Serializable body)
           
 boolean send(Destination from, Destination to, String outgoingCorrelationId, Serializable body)
           
 void send(Destination to, ObjectMessage message)
           
 void setClusterListener(ClusterListener listener)
           
 void setDistributedState(Map state)
           
 void setIncomingCorrelationId(ObjectMessage message, String correlationId)
           
 void setOutgoingCorrelationId(ObjectMessage message, String correlationId)
           
 Quipu setRendezVous(String correlationId, int numLlamas)
           
 void start()
           
 void stop()
           
 

Method Detail

init

public void init(DispatcherConfig config)
          throws Exception
Throws:
Exception

register

public Dispatcher.InternalDispatcher register(Object target,
                                              String methodName,
                                              Class type)

newRegister

public Dispatcher.InternalDispatcher newRegister(Object target,
                                                 String methodName,
                                                 Class type)

deregister

public boolean deregister(String methodName,
                          Class type,
                          int timeout)

newDeregister

public boolean newDeregister(String methodName,
                             Class type,
                             int timeout)

register

public void register(Class type,
                     long timeout)

send

public boolean send(Destination from,
                    Destination to,
                    String outgoingCorrelationId,
                    Serializable body)

exchangeSend

public ObjectMessage exchangeSend(Destination from,
                                  Destination to,
                                  Serializable body,
                                  long timeout)

exchangeSend

public ObjectMessage exchangeSend(Destination from,
                                  Destination to,
                                  Serializable body,
                                  long timeout,
                                  String targetCorrelationId)

exchangeSendLoop

public ObjectMessage exchangeSendLoop(Destination from,
                                      Destination to,
                                      Serializable body,
                                      long timeout,
                                      int iterations)

exchangeSend

public ObjectMessage exchangeSend(Destination from,
                                  Destination to,
                                  String outgoingCorrelationId,
                                  Serializable body,
                                  long timeout)

reply

public boolean reply(Destination from,
                     Destination to,
                     String incomingCorrelationId,
                     Serializable body)

reply

public boolean reply(ObjectMessage message,
                     Serializable body)

exchangeReply

public ObjectMessage exchangeReply(ObjectMessage message,
                                   Serializable body,
                                   long timeout)

exchangeReplyLoop

public ObjectMessage exchangeReplyLoop(ObjectMessage message,
                                       Serializable body,
                                       long timeout)

forward

public boolean forward(ObjectMessage message,
                       Destination destination)

forward

public boolean forward(ObjectMessage message,
                       Destination destination,
                       Serializable body)

getRendezVousMap

public Map getRendezVousMap()

nextCorrelationId

public String nextCorrelationId()

setRendezVous

public Quipu setRendezVous(String correlationId,
                           int numLlamas)

attemptRendezVous

public ObjectMessage attemptRendezVous(String correlationId,
                                       Quipu rv,
                                       long timeout)

getExecutor

public PooledExecutor getExecutor()

getLocalDestination

public Destination getLocalDestination()

getClusterDestination

public Destination getClusterDestination()

getDistributedState

public Map getDistributedState()

setDistributedState

public void setDistributedState(Map state)
                         throws Exception
Throws:
Exception

start

public void start()
           throws Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Throws:
Exception

getNodeName

public String getNodeName(Destination destination)

getIncomingCorrelationId

public String getIncomingCorrelationId(ObjectMessage message)
                                throws Exception
Throws:
Exception

setIncomingCorrelationId

public void setIncomingCorrelationId(ObjectMessage message,
                                     String correlationId)
                              throws Exception
Throws:
Exception

getOutgoingCorrelationId

public String getOutgoingCorrelationId(ObjectMessage message)
                                throws Exception
Throws:
Exception

setOutgoingCorrelationId

public void setOutgoingCorrelationId(ObjectMessage message,
                                     String correlationId)
                              throws Exception
Throws:
Exception

send

public void send(Destination to,
                 ObjectMessage message)
          throws Exception
Throws:
Exception

createObjectMessage

public ObjectMessage createObjectMessage()
                                  throws Exception
Throws:
Exception

getNodeName

public String getNodeName()

getInactiveTime

public long getInactiveTime()

getNumNodes

public int getNumNodes()

setClusterListener

public void setClusterListener(ClusterListener listener)


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