Package org.ros.internal.node.xmlrpc
Class XmlRpcClientFactory<T extends XmlRpcEndpoint>
java.lang.Object
org.ros.internal.node.xmlrpc.XmlRpcClientFactory<T>
- Type Parameters:
T- the type ofXmlRpcEndpointto create clients for
Modified version of
ClientFactory that
requires timeouts in calls.- Author:
- kwc@willowgarage.com (Ken Conley), damonkohler@google.com (Damon Kohler)
-
Constructor Summary
ConstructorsConstructorDescriptionXmlRpcClientFactory(org.apache.xmlrpc.client.XmlRpcClient pClient) Creates a new instance.XmlRpcClientFactory(org.apache.xmlrpc.client.XmlRpcClient pClient, org.apache.xmlrpc.common.TypeConverterFactory pTypeConverterFactory) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.xmlrpc.client.XmlRpcClientReturns the factories client.booleanReturns, whether a method declared by theObject classis performed by the local object, rather than by the server.newInstance(ClassLoader pClassLoader, Class<T> pClass, String pRemoteName, int timeout) Creates an object, which is implementing the given interface.voidsetObjectMethodLocal(boolean pObjectMethodLocal) Sets, whether a method declared by theObject classis performed by the local object, rather than by the server.
-
Constructor Details
-
XmlRpcClientFactory
public XmlRpcClientFactory(org.apache.xmlrpc.client.XmlRpcClient pClient, org.apache.xmlrpc.common.TypeConverterFactory pTypeConverterFactory) Creates a new instance.- Parameters:
pClient- A fully configured XML-RPC client, which is used internally to perform XML-RPC calls.pTypeConverterFactory- Creates instances ofTypeConverterFactory, which are used to transform the result object in its target representation.
-
XmlRpcClientFactory
public XmlRpcClientFactory(org.apache.xmlrpc.client.XmlRpcClient pClient) Creates a new instance. Shortcut fornew ClientFactory(pClient, new TypeConverterFactoryImpl());
- Parameters:
pClient- A fully configured XML-RPC client, which is used internally to perform XML-RPC calls.- See Also:
-
TypeConverterFactoryImpl
-
-
Method Details
-
getClient
public org.apache.xmlrpc.client.XmlRpcClient getClient()Returns the factories client. -
isObjectMethodLocal
public boolean isObjectMethodLocal()Returns, whether a method declared by theObject classis performed by the local object, rather than by the server. Defaults to true. -
setObjectMethodLocal
public void setObjectMethodLocal(boolean pObjectMethodLocal) Sets, whether a method declared by theObject classis performed by the local object, rather than by the server. Defaults to true. -
newInstance
public Object newInstance(ClassLoader pClassLoader, Class<T> pClass, String pRemoteName, int timeout) Creates an object, which is implementing the given interface. The objects methods are internally calling an XML-RPC server by using the factories client.- Parameters:
pClassLoader- The class loader, which is being used for loading classes, if required.pClass- Interface, which is being implemented.pRemoteName- Handler name, which is being used when calling the server. This is used for composing the method name. For example, ifpRemoteNameis "Foo" and you want to invoke the method "bar" in the handler, then the full method name would be "Foo.bar".
-