ServiceBase Class
Class com.probertson.xmlrpc.ServiceBase
Inheritance
>
ServiceBase
Base (super) class for XML-RPC services.
This class is intended to be an abstract class. Instances of ServiceBase should not be created directly;
instead, you can use the dynamic
Service Class or create your own strongly typed ServiceBase subclass
in order to access an XML-RPC service.
Implementers should define a constructor which calls ServiceBase's constructor with all arguments.
Implementers can define their own methods to serve as wrappers for the methods of the specific
XMLRPC service they are accessing. Those methods should in turn call the
ServiceBase.call()
method
to actually make the XML-RPC method call.
Constructor Summary |
---|
protected | Creates a new ServiceBase instance. |
Property Summary |
---|
Connection | |
String | Gets the name of the remote service which this instance "wraps." |
Responder | Gets the mx.rpc.Responder assigned to this instance, if one was assigned to it. |
Method Summary |
---|
protected PendingCall | Implementers should create their own mechanism for allowing access to the XML-RPC
service's methods (e.g. |
protected ServiceMethod | Implementers can use this method to get access to the {see com.probertson.xmlrpc.ServiceMethod} instance which will handle
a particular remote method call in order to make the remote call through the RemoteMethod instance
rather than through {link com.probertson.xmlrpc.ServiceBase#call}. |
ServiceBase
protected function ServiceBase(serviceUri:String, serviceName:String, conn:
Connection, resp:Responder)
Creates a new ServiceBase instance.
Parameters:
serviceUri
- The uri of the XMLRPC service to be called. Use null if
a Connection instance is being provided.
serviceName
- The name of the XMLRPC service. This is not official terminology
but most XMLRPC methods are named "serviceName.methodName", often
with several methods having the same serviceName (e.g. math.Add,
math.Subtract). The first part of the method names (e.g. "math"), with no
period ".", should be provided as the serviceName parameter.
If the methods provided at a given url do not follow the convention
of using a service name prefix, pass null instead.
conn
- A Connection Class instance that should be used by
this service. This can be given as an alternative to providing a
serviceUri. In practice there is little reason to use this parameter;
Connections with the same uri are reused internally in any case, so there
is no performance benefit from passing in an already-created Connection.
resp
- A mx.rpc.Responder instance that should receive Result and Fault responses
from the method calls. You can use this parameter if you want a single
Responder to handle responses from all remote method calls, rather than
creating a separate Responder for each method.
name
public function get name():String
Gets the name of the remote service which this instance "wraps."
responder
public function get responder():Responder
Gets the mx.rpc.Responder assigned to this instance, if one was assigned to it.
call
Implementers should create their own mechanism for allowing access to the XML-RPC
service's methods (e.g. a wrapper method). Your subclass should call
this method to actually perform the remote method call.
this method.
Parameters:
methodName
- The name of the remote method to call.
[param1...paramN]
- The parameters to be passed to the remote method. These can be any of
the allowed XML-RPC types.
getServiceMethod
protected function getServiceMethod(methodName:String):
ServiceMethodImplementers can use this method to get access to the {see com.probertson.xmlrpc.ServiceMethod} instance which will handle
a particular remote method call in order to make the remote call through the RemoteMethod instance
rather than through {link com.probertson.xmlrpc.ServiceBase#call}. For most cases ServiceBase.call() will suffice.
The most common reason you might want to get access to the ServiceMethod would be to pass the
method parameters as an array rather than as separate parameters.
Parameters:
methodName
- The name of the remote method whose respective ServiceMethod instance
should be returned.
Documentation generated by BLDoc Community Edition from B-Line Express.