|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectredstone.xmlrpc.XmlRpcServer
public class XmlRpcServer
An XmlRpcServer is responsible for hosting a set of invocation handlers and a set of invocation interceptors. It is invoked by calling the execute() method, supplying a stream containing the XML-RPC message to be handled. The messages will be parsed and dispatched to the corresponding invocation handler, if any.
The XmlRpcServer may also be started as a service accepting connections on a given port. This way, a servlet environment is not required to be able to expose XML-RPC services. The server acts as a minimal HTTP server accepting text/xml posts containing XML-RPC messages, only.
For further information on setting up an XML-RPC server, see the documentation.
| Constructor Summary | |
|---|---|
XmlRpcServer()
Default constructor using default serializer supporting the basic types as well the custom serializers. |
|
XmlRpcServer(XmlRpcSerializer serializer)
Accepts a serializer to be used during serialization. |
|
| Method Summary | |
|---|---|
void |
addInvocationHandler(java.lang.String name,
java.lang.Object handler)
Binds an invocation handler object to the given name. |
void |
addInvocationHandler(java.lang.String name,
XmlRpcInvocationHandler handler)
Binds an invocation handler object to the given name. |
void |
addInvocationInterceptor(XmlRpcInvocationInterceptor interceptor)
Invocation interceptors are invoked on every call, regardless of which handler or method the call is intended for. |
void |
execute(java.io.InputStream xmlInput,
java.io.Writer output)
Dispatches the call contained in the supplied input stream. |
XmlRpcInvocationHandler |
getInvocationHandler(java.lang.String name)
Returns the invocation handler with the given name. |
java.util.List<XmlRpcInvocationInterceptor> |
getInvocationInterceptors()
Returns the incovation interceptors installed in this server. |
XmlRpcSerializer |
getSerializer()
Returns the serializer this server is using to encode responses. |
void |
removeInvocationHandler(java.lang.String name)
Unbinds a previously bound invocation handler. |
void |
removeInvocationInterceptor(XmlRpcInvocationInterceptor interceptor)
Removes a previously registered invocation interceptor. |
void |
setSerializer(XmlRpcSerializer serializer)
Sets the serializer this server is to use when encoding responses. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlRpcServer()
public XmlRpcServer(XmlRpcSerializer serializer)
serializer - The serializer to use for response messages.| Method Detail |
|---|
public void execute(java.io.InputStream xmlInput,
java.io.Writer output)
throws XmlRpcException
xmlInput - The stream containing the XML-RPC message.xmlOutput - The stream to put the response in.
XmlRpcException - if the input stream contains unparseable XML or if some error
occurs in the SAX driver.
public void addInvocationHandler(java.lang.String name,
java.lang.Object handler)
name - The name to bind the handler to.handler - The invocation handler object.
public void addInvocationHandler(java.lang.String name,
XmlRpcInvocationHandler handler)
name - The name to bind the handler to.handler - The invocation handler object.public XmlRpcInvocationHandler getInvocationHandler(java.lang.String name)
name - The name of the invocation handler to return.
public void removeInvocationHandler(java.lang.String name)
name - The name of the handler to unbind.public void addInvocationInterceptor(XmlRpcInvocationInterceptor interceptor)
interceptor - An invocation interceptor that will be invoked on every call
sent to this server.public java.util.List<XmlRpcInvocationInterceptor> getInvocationInterceptors()
public void removeInvocationInterceptor(XmlRpcInvocationInterceptor interceptor)
interceptor - The invocation interceptor to removepublic XmlRpcSerializer getSerializer()
public void setSerializer(XmlRpcSerializer serializer)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||