org.iids.aos.systemservices.communicator
Class XmlRpcLSCommunicator

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

public class XmlRpcLSCommunicator
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  XmlRpcLSWebServer listener
           
 
Constructor Summary
XmlRpcLSCommunicator(AgentScapeConfig config)
           
XmlRpcLSCommunicator(java.lang.String principalId, java.lang.String principalPassword, java.lang.String localIpAddress)
           
XmlRpcLSCommunicator(java.lang.String principalId, java.lang.String principalPassword, java.lang.String localIpAddress, boolean clientOnly)
           
XmlRpcLSCommunicator(java.lang.String principalId, java.lang.String principalPassword, java.lang.String localIpAddress, int listenPort)
           
 
Method Summary
 void acceptClient(java.lang.String address)
           
 SystemService bind(java.lang.Class _serviceClass, Address address)
           
 SystemService bind(java.lang.String _serviceClassName, java.lang.String _serviceId, java.lang.String _hostname, int _port)
           
 void denyClient(java.lang.String address)
           
 java.lang.Object execute(java.lang.String _methodName, java.util.Vector _parameters, org.apache.xmlrpc.XmlRpcContext _xmlRpcContext)
           
 Address getAddress()
           
 int getListenPort()
           
 Marshaller getMarshaller()
           
protected  XmlRpcLSWebServer getXmlRpcListener(java.lang.String _serviceId, java.lang.String localIpAddress, int listenPort)
           
 void publish(InterfaceMethod _method)
           
 void resetAcceptClient()
           
 void resetDenyClient()
           
 void setAddress(Address address)
           
 void setHttpMethod(java.lang.Object o, java.lang.reflect.Method m)
           
 void setListenPort(int _listenPort)
           
 void setParanoid(boolean b)
           
 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 XmlRpcLSWebServer listener
Constructor Detail

XmlRpcLSCommunicator

public XmlRpcLSCommunicator(AgentScapeConfig config)
                     throws CommunicatorException
Throws:
CommunicatorException

XmlRpcLSCommunicator

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

XmlRpcLSCommunicator

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

XmlRpcLSCommunicator

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

setHttpMethod

public void setHttpMethod(java.lang.Object o,
                          java.lang.reflect.Method m)

setParanoid

public void setParanoid(boolean b)

acceptClient

public void acceptClient(java.lang.String address)

denyClient

public void denyClient(java.lang.String address)

resetAcceptClient

public void resetAcceptClient()

resetDenyClient

public void resetDenyClient()

getXmlRpcListener

protected XmlRpcLSWebServer getXmlRpcListener(java.lang.String _serviceId,
                                              java.lang.String localIpAddress,
                                              int listenPort)
                                       throws CommunicatorException
Throws:
CommunicatorException

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.