org.iids.aos.systemservices.communicator
Class XmlRpcCommunicator

java.lang.Object
  extended by org.iids.aos.systemservices.communicator.XmlRpcCommunicator
All Implemented Interfaces:
org.apache.xmlrpc.ContextXmlRpcHandler, Communicator

public class XmlRpcCommunicator
extends java.lang.Object
implements org.apache.xmlrpc.ContextXmlRpcHandler, Communicator

Author:
hidde@cs.vu.nl creates an xmlrpc version of the communicator, and completes the address by filling in the contact port

Field Summary
protected  XmlRpcWebServer listener
           
 
Constructor Summary
XmlRpcCommunicator(AgentScapeConfig config)
           
XmlRpcCommunicator(java.lang.String principalId, java.lang.String principalPassword, java.lang.String localIpAddress)
           
XmlRpcCommunicator(java.lang.String principalId, java.lang.String principalPassword, java.lang.String localIpAddress, boolean clientOnly)
           
XmlRpcCommunicator(java.lang.String principalId, java.lang.String principalPassword, java.lang.String localIpAddress, int listenPort)
           
 
Method Summary
 SystemService bind(java.lang.Class _serviceClass, Address address)
           
 SystemService bind(java.lang.String _serviceClassName, java.lang.String _serviceId, java.lang.String _hostname, int _port)
           
 java.lang.Object execute(java.lang.String _methodName, java.util.Vector _parameters, org.apache.xmlrpc.XmlRpcContext _xmlRpcContext)
           
 Address getAddress()
           
 int getListenPort()
           
 Marshaller getMarshaller()
           
 void publish(InterfaceMethod _method)
           
 void setAddress(Address address)
           
 void setListenPort(int _listenPort)
           
 void shutdown()
           
 void shutdownHard()
          Close forcefully, used for testing IPC errors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listener

protected XmlRpcWebServer listener
Constructor Detail

XmlRpcCommunicator

public XmlRpcCommunicator(AgentScapeConfig config)
                   throws CommunicatorException
Throws:
CommunicatorException

XmlRpcCommunicator

public XmlRpcCommunicator(java.lang.String principalId,
                          java.lang.String principalPassword,
                          java.lang.String localIpAddress)
                   throws CommunicatorException
Throws:
CommunicatorException

XmlRpcCommunicator

public XmlRpcCommunicator(java.lang.String principalId,
                          java.lang.String principalPassword,
                          java.lang.String localIpAddress,
                          int listenPort)
                   throws CommunicatorException
Throws:
CommunicatorException

XmlRpcCommunicator

public XmlRpcCommunicator(java.lang.String principalId,
                          java.lang.String principalPassword,
                          java.lang.String localIpAddress,
                          boolean clientOnly)
                   throws CommunicatorException
Throws:
CommunicatorException
Method Detail

shutdown

public void shutdown()
Specified by:
shutdown in interface Communicator

shutdownHard

public void shutdownHard()
Close forcefully, used for testing IPC errors


execute

public java.lang.Object execute(java.lang.String _methodName,
                                java.util.Vector _parameters,
                                org.apache.xmlrpc.XmlRpcContext _xmlRpcContext)
                         throws java.lang.Exception
Specified by:
execute in interface org.apache.xmlrpc.ContextXmlRpcHandler
Throws:
java.lang.Exception

bind

public SystemService bind(java.lang.String _serviceClassName,
                          java.lang.String _serviceId,
                          java.lang.String _hostname,
                          int _port)
                   throws CommunicatorException
Throws:
CommunicatorException

bind

public SystemService bind(java.lang.Class _serviceClass,
                          Address address)
                   throws CommunicatorException
Specified by:
bind in interface Communicator
Throws:
CommunicatorException

getMarshaller

public Marshaller getMarshaller()
Specified by:
getMarshaller in interface Communicator

publish

public void publish(InterfaceMethod _method)
             throws CommunicatorException
Specified by:
publish in interface Communicator
Throws:
CommunicatorException

getListenPort

public int getListenPort()

setListenPort

public void setListenPort(int _listenPort)

getAddress

public Address getAddress()
Specified by:
getAddress in interface Communicator

setAddress

public void setAddress(Address address)


Copyright ? 2003, 2004 IIDS Group. All Rights Reserved.