com.createtank.elemenope
Class DispatcherFailoverImpl

java.lang.Object
  extended by com.createtank.elemenope.DispatcherFailoverImpl
All Implemented Interfaces:
Dispatcher, ElemenopeComponent, ElemenopeConnectionEntity, FailoverDispatcher
Direct Known Subclasses:
DirectCallDispatcher, JmsQueueDispatcher, SoapDispatcher, SoapMethodDispatcher, XmlRpcDispatcher, XmlRpcElemenopeDispatcher

public abstract class DispatcherFailoverImpl
extends java.lang.Object
implements FailoverDispatcher

Abstract Dispatcher implementation class providing generic DispatcherFailover [DFO] functionality.

Author:
John Joseph Roets [joe@createtank.com]

Constructor Summary
DispatcherFailoverImpl()
          Creates a new instance of DispatcherFailoverImpl
 
Method Summary
 ElemenopeDispatchResponse failover(ElemenopeDispatchResponse edr, java.lang.String operationType, java.lang.Object object)
          Called by child classes when a dispatch effort has failed.
 ElemenopeDispatchResponse failover(ElemenopeDispatchResponse edr, java.lang.String operationType, java.lang.Object object, java.util.Map atts)
          Called by child classes when a dispatch effort has failed.
 ElemenopeDispatchResponse send(ElemenopeDispatchResponse edr, java.lang.String operationType, java.lang.Object object)
          Calls the implementation specific callback functionality in order to attempt failover.
 ElemenopeDispatchResponse send(ElemenopeDispatchResponse edr, java.lang.String operationType, java.lang.Object object, java.util.Map atts)
          Calls the implementation specific callback functionality in order to attempt failover.
 ElemenopeDispatchResponse send(OperationType object)
          Sends TrnasactionType Object through configured Connection entity.
 ElemenopeDispatchResponse send(java.lang.String operationType, java.lang.Object object)
          Sends generic Object through configured Connection entity.
 ElemenopeDispatchResponse send(java.lang.String operationType, java.lang.Object object, java.util.Map atts)
          Sends generic Object through configured Connection entity.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.createtank.elemenope.FailoverDispatcher
dispatchCallback, dispatchCallback
 
Methods inherited from interface com.createtank.elemenope.ElemenopeComponent
releaseComponents, setComponents, setConfigurationAttributes
 
Methods inherited from interface com.createtank.elemenope.ElemenopeConnectionEntity
getConnectionAttributes, setConnectionAttributes
 

Constructor Detail

DispatcherFailoverImpl

public DispatcherFailoverImpl()
Creates a new instance of DispatcherFailoverImpl

Method Detail

failover

public ElemenopeDispatchResponse failover(ElemenopeDispatchResponse edr,
                                          java.lang.String operationType,
                                          java.lang.Object object)
                                   throws ElemenopeException
Called by child classes when a dispatch effort has failed.

Iterates through all configured failover Dispatchers recursively until success or depletion of configured Dispatchers.

Specified by:
failover in interface FailoverDispatcher
Parameters:
edr - Response container object
Returns:
Throws:
ElemenopeException

failover

public ElemenopeDispatchResponse failover(ElemenopeDispatchResponse edr,
                                          java.lang.String operationType,
                                          java.lang.Object object,
                                          java.util.Map atts)
                                   throws ElemenopeException
Called by child classes when a dispatch effort has failed.

Iterates through all configured failover Dispatchers recursively until success or depletion of configured Dispatchers.

Specified by:
failover in interface FailoverDispatcher
Parameters:
edr - Response container object
Returns:
Throws:
ElemenopeException

send

public ElemenopeDispatchResponse send(ElemenopeDispatchResponse edr,
                                      java.lang.String operationType,
                                      java.lang.Object object)
                               throws ElemenopeException
Calls the implementation specific callback functionality in order to attempt failover.

Specified by:
send in interface FailoverDispatcher
Returns:
Throws:
ElemenopeException

send

public ElemenopeDispatchResponse send(ElemenopeDispatchResponse edr,
                                      java.lang.String operationType,
                                      java.lang.Object object,
                                      java.util.Map atts)
                               throws ElemenopeException
Calls the implementation specific callback functionality in order to attempt failover.

Specified by:
send in interface FailoverDispatcher
Returns:
Throws:
ElemenopeException

send

public ElemenopeDispatchResponse send(java.lang.String operationType,
                                      java.lang.Object object,
                                      java.util.Map atts)
                               throws ElemenopeException
Description copied from interface: Dispatcher
Sends generic Object through configured Connection entity.

Specified by:
send in interface Dispatcher
Parameters:
operationType - configured name of operation to execute.
object - Object to send.
atts - attributes to send along with message if applicable.
Returns:
ElemenopeDispatchResponse object containing data returned and further information on the dispatch path and DispatcherFailover [DFO] information.
Throws:
ElemenopeException

send

public ElemenopeDispatchResponse send(OperationType object)
                               throws ElemenopeException
Description copied from interface: Dispatcher
Sends TrnasactionType Object through configured Connection entity.

Specified by:
send in interface Dispatcher
Returns:
Throws:
ElemenopeException

send

public ElemenopeDispatchResponse send(java.lang.String operationType,
                                      java.lang.Object object)
                               throws ElemenopeException
Description copied from interface: Dispatcher
Sends generic Object through configured Connection entity.

Specified by:
send in interface Dispatcher
Parameters:
operationType - configured name of operation to execute.
object - Object to send.
Returns:
ElemenopeDispatchResponse object containing data returned and further information on the dispatch path and DispatcherFailover [DFO] information.
Throws:
ElemenopeException