public final class CallHandler
extends java.lang.Object
RPC_MethodHandler
will be returned. Calls to web
services can be described in the same way, in classes that extend the licas default
ones. A Rest_MethodHandler
can be used to make REST-style calls on remote sources.
If a SOAP web service call is specified, then a Soap_BaseHandler
object can be returned.
To use these, you need to set the factory objects in your main code. That is: RestFactory
and
WsFactory
.Constructor and Description |
---|
CallHandler() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canInvoke(java.lang.String serverURL,
java.lang.String serverPassword,
java.lang.String serviceID,
int callTimeout)
Try to call the server to test the connection and then check if a service with
the specified name is running and can be invoked.
|
static RemoteCallDef |
getRemoteCommunicationObject(MethodInfo methodInfo)
Get the appropriate object to make a remote communication call with.
|
static boolean |
isREST(java.lang.String callType)
Return true if the call type is a SOAP call.
|
static boolean |
isSOAP(java.lang.String callType)
Return true if the call type is a SOAP call.
|
static boolean |
isWsCall(MethodInfo methodInfo)
Return true if the info object indicates a web service call (REST or SOAP).
|
static boolean |
isXMLRPC(java.lang.String callType)
Return true if the call type is an XML-RPC call.
|
static boolean |
testPing(java.lang.String ipAddress)
Ping the ip address and return true if it is reachable.
|
static boolean |
testServerConnection(org.licas_xml.abs.Element serverHandle)
Try to call the server to test the connection.
|
static boolean |
testServerConnection(org.licas_xml.abs.Element serverHandle,
java.lang.String serverPassword)
Try to call the server to test the connection.
|
public static RemoteCallDef getRemoteCommunicationObject(MethodInfo methodInfo)
methodInfo
- the method call description with all of the required information.public static boolean isXMLRPC(java.lang.String callType)
callType
- the call type description.public static boolean isREST(java.lang.String callType)
callType
- the call type description.public static boolean isSOAP(java.lang.String callType)
callType
- the call type description.public static boolean isWsCall(MethodInfo methodInfo)
methodInfo
- the info object to check.public static boolean testServerConnection(org.licas_xml.abs.Element serverHandle)
serverHandle
- the server uri handle.public static boolean testServerConnection(org.licas_xml.abs.Element serverHandle, java.lang.String serverPassword)
serverHandle
- the server uri handle.serverPassword
- the server password to use.public static boolean testPing(java.lang.String ipAddress)
ipAddress
- the address to ping.public static boolean canInvoke(java.lang.String serverURL, java.lang.String serverPassword, java.lang.String serviceID, int callTimeout)
testServerConnection
as part of the process.serverURL
- the server url address.serverPassword
- the server password to use.serviceID
- the service uuid.callTimeout
- allowed reply time in milliseconds.