com.createtank.elemenope.transports
Class XmlRpcServerConnector

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

public class XmlRpcServerConnector
extends java.lang.Object
implements Connector, ElemenopeConnectionEntity

XML-RPC implementation of the elemenope Connector interface.

For use in creating an XML-RPC service.

For an example configuration, see xmlrpc.xml

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

Constructor Summary
XmlRpcServerConnector()
          Creates a new instance of XmlRpcConnector
 
Method Summary
 void connect()
          makes initial connection to entity
 void disconnect()
          closes connection to entity
 java.lang.Object getConnection()
          Get connection implementation specific object.
 java.util.Map getConnectionAttributes()
          gets connectivity attributes
 boolean isActive()
          May be used by DispatcherFailover [DFO] implementations to ascertain whether a connection is currently viable.
 void releaseComponents()
          Should be called upon shutdown, in order for elemenope component classes clean up after themselves.
 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 start()
          starts the connection to entity
 void stop()
          stops the connection to entity
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcServerConnector

public XmlRpcServerConnector()
Creates a new instance of XmlRpcConnector

Method Detail

connect

public void connect()
             throws ElemenopeConnectionException
Description copied from interface: Connector
makes initial connection to entity

Specified by:
connect in interface Connector
Throws:
ElemenopeConnectionException

disconnect

public void disconnect()
                throws ElemenopeConnectionException
Description copied from interface: Connector
closes connection to entity

Specified by:
disconnect in interface Connector
Throws:
ElemenopeConnectionException

getConnection

public java.lang.Object getConnection()
                               throws ElemenopeException
Description copied from interface: Connector
Get connection implementation specific object.

Used by some implementations to pass connection for use by Broker or Dispatcher.

Specified by:
getConnection in interface Connector
Returns:
connection implementation specific object.
Throws:
ElemenopeException

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

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

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

start

public void start()
           throws ElemenopeConnectionException
Description copied from interface: Connector
starts the connection to entity

Specified by:
start in interface Connector
Throws:
ElemenopeConnectionException

stop

public void stop()
          throws ElemenopeConnectionException
Description copied from interface: Connector
stops the connection to entity

Specified by:
stop in interface Connector
Throws:
ElemenopeConnectionException

isActive

public boolean isActive()
Description copied from interface: Connector
May be used by DispatcherFailover [DFO] implementations to ascertain whether a connection is currently viable.

Specified by:
isActive in interface Connector
Returns:
Is connection active?

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