|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler redstone.xmlrpc.XmlRpcParser redstone.xmlrpc.XmlRpcClient
public class XmlRpcClient
An XmlRpcClient represents a connection to an XML-RPC enabled server.
Field Summary |
---|
Fields inherited from class redstone.xmlrpc.XmlRpcParser |
---|
ARRAY, BASE64, BOOLEAN, DATE, DOUBLE, I4, INT, MEMBER, NAME, STRING, STRUCT, VALUE |
Constructor Summary | |
---|---|
XmlRpcClient(java.lang.String url,
boolean streamMessages)
Creates a new client with the ability to send XML-RPC messages to the the server at the given URL. |
|
XmlRpcClient(java.net.URL url,
boolean streamMessages)
|
Method Summary | |
---|---|
java.lang.Object |
invoke(java.lang.String method,
java.util.List arguments)
Invokes a method on the terminating XML-RPC end point. |
java.lang.Object |
invoke(java.lang.String method,
java.lang.Object[] arguments)
Invokes a method on the terminating XML-RPC end point. |
void |
invokeAsynchronously(java.lang.String method,
java.lang.Object arguments,
XmlRpcCallback callback)
A asynchronous version of invoke performing the call in a separate thread and reporting responses, faults, and exceptions through the supplied XmlRpcCallback. |
void |
startElement(java.lang.String uri,
java.lang.String name,
java.lang.String qualifiedName,
org.xml.sax.Attributes attributes)
Override the startElement() method inherited from XmlRpcParser. |
Methods inherited from class redstone.xmlrpc.XmlRpcParser |
---|
characters, endElement, parse |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlRpcClient(java.lang.String url, boolean streamMessages) throws java.net.MalformedURLException
url
- the URL at which the XML-RPC service is locaedstreamMessages
- Indicates whether or not to stream messages directly
or if the messages should be completed locally
before being sent all at once. Streaming is not
directly supported by XML-RPC, since the
Content-Length header is not included in the HTTP post.
If the other end is not relying on Content-Length,
streaming the message directly is much more efficient.
java.net.MalformedURLException
public XmlRpcClient(java.net.URL url, boolean streamMessages)
XmlRpcClient(String,boolean)
Method Detail |
---|
public java.lang.Object invoke(java.lang.String method, java.util.List arguments) throws XmlRpcException, XmlRpcFault
invoke
in interface XmlRpcInvocationHandler
method
- The name of the method to call.arguments
- The arguments to encode in the call.
XmlRpcException
- One or more of the supplied arguments are unserializable. That is,
the built-in serializer connot parse it or find a custom serializer
that can. There may also be problems with the socket communication.
XmlRpcFault
public java.lang.Object invoke(java.lang.String method, java.lang.Object[] arguments) throws XmlRpcException, XmlRpcFault
method
- The name of the method to call.arguments
- The arguments to encode in the call.
XmlRpcException
- One or more of the supplied arguments are unserializable. That is,
the built-in serializer connot parse it or find a custom serializer
that can. There may also be problems with the socket communication.
XmlRpcFault
public void invokeAsynchronously(java.lang.String method, java.lang.Object arguments, XmlRpcCallback callback)
method
- The name of the method at the server.arguments
- The arguments for the call. This may be either a java.util.List
descendant, or a java.lang.Object[] array.callback
- An object implementing the XmlRpcCallback interface. If callback is
null, the call will be performed but any results, faults, or exceptions
will be ignored (fire and forget).public void startElement(java.lang.String uri, java.lang.String name, java.lang.String qualifiedName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class XmlRpcParser
See
- SAX documentation
org.xml.sax.SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |