|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dfki.lt.hog.Application
de.dfki.lt.hog.XmlRpcApplication
public abstract class XmlRpcApplication
An XmlRpcApplication
provides methods and fields for
an application which uses the XML-RPC protocol to communicate with
MoCoMan.
These methods and fields are, among others, an XmlRpcClient, an URL
to MoCoMan's XmlRpcServer, a handler name and handler method names.
For all these fields, there are get
and set
methods to change and retrieve each of them.
Field Summary | |
---|---|
static java.lang.String |
XMLRPC_HANDLER_METHOD
Key for a handler method for XML-RPC calls in the properties of this XmlRpcApplications . |
static java.lang.String |
XMLRPC_HANDLER_NAME
Key for a handler for XML-RPC calls in the properties of this XmlRpcApplications . |
static java.lang.String |
XMLRPC_SERVER_PORT
Key for server port in the properties of this XmlRpcApplications . |
static java.lang.String |
XMLRPC_SERVER_URL
Key for server URL in the properties of this XmlRpcApplications . |
Fields inherited from class de.dfki.lt.hog.Application |
---|
applicationLog, DATABASE_URI, DATABASE_USER |
Constructor Summary | |
---|---|
XmlRpcApplication()
|
Method Summary | |
---|---|
org.apache.xmlrpc.XmlRpcClient |
getXmlRpcApplicationClient()
Returns the XML-RPC client of this XmlRpcApplications . |
java.lang.String[] |
getXmlRpcHandlerMethods()
Returns an array of names of possible methods for XML-RPC calls. |
java.lang.String |
getXmlRpcHandlerName()
Returns the name of the handler of XML-RPC calls. |
int |
getXmlRpcServerPort()
Returns the port of the server which answers XML-RPC calls. |
protected java.lang.String |
getXmlRpcServerUrl()
Returns the URL of the server which answers XML-RPC calls. |
void |
init(java.util.Properties xmlRpcApplProps)
Initializes field values with values from configuration. |
java.lang.String |
process(java.lang.String aMethodName,
java.util.Vector params)
Sends parameters to a remote module by an XmlRpcClient . |
void |
setXmlRpcApplicationClient(org.apache.xmlrpc.XmlRpcClient aClient)
Sets an XML-RPC client for this XmlRpcApplications . |
void |
setXmlRpcServerPort(int aPort)
Sets a port to a server for XML-RPC calls |
void |
shutdown(java.lang.String aModuleName)
Shutsdown a remote module. |
void |
start(java.lang.String aModuleName)
Starts a remote adaptor to communicate with. |
Methods inherited from class de.dfki.lt.hog.Application |
---|
getConfig, getDatabaseUri, getDatabaseUser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XMLRPC_SERVER_URL
XmlRpcApplications
.
public static final java.lang.String XMLRPC_SERVER_PORT
XmlRpcApplications
.
public static final java.lang.String XMLRPC_HANDLER_NAME
XmlRpcApplications
.
public static final java.lang.String XMLRPC_HANDLER_METHOD
XmlRpcApplications
.
Constructor Detail |
---|
public XmlRpcApplication()
Method Detail |
---|
public void init(java.util.Properties xmlRpcApplProps)
Application
init
in class Application
public org.apache.xmlrpc.XmlRpcClient getXmlRpcApplicationClient()
XmlRpcApplications
.
public void setXmlRpcApplicationClient(org.apache.xmlrpc.XmlRpcClient aClient)
XmlRpcApplications
.
aClient
- a new XML-RPC client for this
XmlRpcApplications
.protected java.lang.String getXmlRpcServerUrl()
public int getXmlRpcServerPort()
public void setXmlRpcServerPort(int aPort)
aPort
- a new portpublic java.lang.String getXmlRpcHandlerName()
public java.lang.String[] getXmlRpcHandlerMethods()
public void shutdown(java.lang.String aModuleName)
XmlRpcClientInterface
shutdown
in interface XmlRpcClientInterface
aModuleName
- name of the module to shut downpublic java.lang.String process(java.lang.String aMethodName, java.util.Vector params)
XmlRpcClientInterface
XmlRpcClient
.
Calls therefore the execute
method of XmlRpcClient
.
process
in interface XmlRpcClientInterface
aMethodName
- name of a method which process params
remotelyparams
- paramters for remote methodpublic void start(java.lang.String aModuleName)
XmlRpcClientInterface
XmlRpcModule
and could start an
adaptor via a shell or Python script, for example.
start
in interface XmlRpcClientInterface
aModuleName
- name of the module to start
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |