com.createtank.elemenope.transports
Class DistributionListDispatcher

java.lang.Object
  extended by com.createtank.elemenope.transports.DistributionListDispatcher
All Implemented Interfaces:
Dispatcher, ElemenopeComponent, ElemenopeConnectionEntity

public class DistributionListDispatcher
extends java.lang.Object
implements Dispatcher

Generic distribution list implementation of the elemenope Dispatcher interface.

Sends through all Dispatchers in the configured list.

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

Constructor Summary
DistributionListDispatcher()
          Creates a new instance
 
Method Summary
 void connect()
          not implemented
 java.util.Map getConnectionAttributes()
          gets connectivity attributes
 void releaseComponents()
          Should be called upon shutdown, in order for elemenope component classes clean up after themselves.
 ElemenopeDispatchResponse send(ElemenopeDispatchResponse edr, java.lang.String operationType, java.lang.Object object)
           
 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.
 void setComponents(ElemenopeComponents components)
          Passes all configured components to implementing Object.
 void setConfigurationAttributes(java.util.Map atts)
          sets configuration attributes
 void setConnectionAttributes(java.util.Map atts)
          sets connectivity attributes
 void startConnection()
          Builds list of Dispatchers to use for all calls to send.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributionListDispatcher

public DistributionListDispatcher()
Creates a new instance

Method Detail

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,
                                      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(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

setConnectionAttributes

public void setConnectionAttributes(java.util.Map atts)
                             throws ElemenopeException
Description copied from interface: ElemenopeConnectionEntity
sets connectivity attributes

Specified by:
setConnectionAttributes in interface ElemenopeConnectionEntity
Parameters:
atts - Map of connectivity attributes
Throws:
ElemenopeException

connect

public void connect()
             throws java.lang.Exception
not implemented

Throws:
java.lang.Exception - Exception thrown when problems occur connecting.

setComponents

public void setComponents(ElemenopeComponents components)
Description copied from interface: ElemenopeComponent
Passes all configured components to implementing Object.

Should ususally be called at the end of the initialization cycle, when all components have been instantiated.

Specified by:
setComponents in interface ElemenopeComponent

startConnection

public void startConnection()
                     throws ElemenopeConnectionException
Builds list of Dispatchers to use for all calls to send.

Throws:
ElemenopeConnectionException

getConnectionAttributes

public java.util.Map getConnectionAttributes()
                                      throws ElemenopeException
Description copied from interface: ElemenopeConnectionEntity
gets connectivity attributes

Specified by:
getConnectionAttributes in interface ElemenopeConnectionEntity
Returns:
connectivity attributes
Throws:
ElemenopeException

send

public ElemenopeDispatchResponse send(ElemenopeDispatchResponse edr,
                                      java.lang.String operationType,
                                      java.lang.Object object)
                               throws ElemenopeException
Throws:
ElemenopeException

releaseComponents

public void releaseComponents()
Description copied from interface: ElemenopeComponent
Should be called upon shutdown, in order for elemenope component classes clean up after themselves.

Specified by:
releaseComponents in interface ElemenopeComponent

setConfigurationAttributes

public void setConfigurationAttributes(java.util.Map atts)
                                throws ElemenopeException
Description copied from interface: ElemenopeComponent
sets configuration attributes

Specified by:
setConfigurationAttributes in interface ElemenopeComponent
Parameters:
atts - Map of connectivity attributes
Throws:
ElemenopeException