Class MultiSpeakService
java.lang.Object
com.ecec.rweber.multispeak.MultiSpeakService
This is an abstract class representing a service endpoint such as MR (meter reading), OA (outage managment), etc.
To interact in a meaningful way with any MultiSpeak endpoint this class should be extended and specific methods implemented per vendor implementations of each Multispeak Service. This class can be created standalone with the call() method being used to pass method names as String objects.
- Author:
- rweber
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MultiSpeakClientprotected org.apache.logging.log4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis is a convenience method for Multispeak calls with no parametersCall a Multispeak method with the given parameters.Calls a MultiSpeak SOAP method using a list of pre-built JDOM element parameters.createElement(String name) protected ElementcreateElement(String name, String value) protected NamespaceAll MultiSpeak Endpoints should implement thisbooleanping()All MultiSpeak Endpoints should implement this
-
Field Details
-
m_log
protected org.apache.logging.log4j.Logger m_log -
m_client
-
-
Constructor Details
-
MultiSpeakService
- Parameters:
endpoint- a valid MultiSpeakEndpoint - connection information
-
-
Method Details
-
getLastResult
-
getEndpointNamespace
-
createElement
-
createElement
-
getMethods
-
ping
public boolean ping()All MultiSpeak Endpoints should implement this- Returns:
- true/false if the ping was successful
-
call
This is a convenience method for Multispeak calls with no parameters- Parameters:
method- the method to send to the MultiSpeak Service- Returns:
- the result element with the SOAP envelope stripped off
-
call
Call a Multispeak method with the given parameters. Results are returned as an XML element of the payload- Parameters:
method- the method to send to the MultiSpeak Serviceparams- any parameters to pass, can be null- Returns:
- the result element with the SOAP envelope stripped off - can be NULL
-
call
Calls a MultiSpeak SOAP method using a list of pre-built JDOM element parameters.- Parameters:
method- the method to send to the MultiSpeak Serviceparams- the list of JDOM Elements representing the method parameters- Returns:
- the result element with the SOAP envelope stripped off - can be NULL
-