|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dfki.lt.hog.Adaptor
public abstract class Adaptor
Adaptor
is an abstract class which provides methods for
a remote module that functions as an XML-RPC server.
It is instantied with a Properties
object which is
created through a config file. In this file a server port must be
specified on which a subclass of Adaptor
listens. The
addHandler
method registers a handler which processes
incoming requests. Adpator
is a default implementation
of XmlRpcServerInterface
.
Field Summary | |
---|---|
static java.lang.String |
WEBSERVER_PORT_PROP
Key for port of XML-RPC server in Properties . |
Constructor Summary | |
---|---|
Adaptor(java.util.Properties adaptorProps)
Creates an Adaptor with a given configuration as
Properties object. |
Method Summary | |
---|---|
void |
addHandler(java.lang.String aHandlerName,
java.lang.Object aHandler)
Adds a handler object to the WebServer of this
Adaptor . |
java.util.Properties |
getConfig()
Returns configuration of this Adaptor |
java.lang.Object |
getHandler(java.lang.String aHandlerName)
Returns a handler object from handlers
hashtable. |
java.util.Hashtable |
getHandlers()
Returns hashtable of handlers registeres so far |
org.apache.xmlrpc.WebServer |
getServer()
Returns XML-RPC server of this Adaptor |
int |
getServerPort()
Returns port on which the server is listening |
void |
shutdown()
Shuts down an Adaptor . |
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 WEBSERVER_PORT_PROP
Properties
.
Constructor Detail |
---|
public Adaptor(java.util.Properties adaptorProps)
Adaptor
with a given configuration as
Properties
object. Instantiates a
WebServer
listening on a port contained in
configuration.
adaptorProps
- Properties
configurating
this Adaptor
Method Detail |
---|
public void addHandler(java.lang.String aHandlerName, java.lang.Object aHandler)
WebServer
of this
Adaptor
.
A specific method is called by
aHandlerName.aMethodName
where
aMethodName
is implemented by aHandler
.
addHandler
in interface XmlRpcServerInterface
aHandlerName
- a String to which an handling object is mappedaHandler
- remote calls handling objectpublic java.lang.Object getHandler(java.lang.String aHandlerName)
handlers
hashtable.
getHandler
in interface XmlRpcServerInterface
aHandlerName
- name of handler in hashtable
public java.util.Properties getConfig()
Adaptor
Adaptor
as
Properties
objectpublic java.util.Hashtable getHandlers()
public org.apache.xmlrpc.WebServer getServer()
Adaptor
getServer
in interface XmlRpcServerInterface
Adaptor
public int getServerPort()
getServerPort
in interface XmlRpcServerInterface
public void shutdown()
Adaptor
.
Has to be overriden for shutting down special components of
derived subclass.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |