Package org.opennms.core.rpc.xml
Class AbstractXmlRpcModule<S extends RpcRequest,T extends RpcResponse>
- java.lang.Object
-
- org.opennms.core.rpc.xml.AbstractXmlRpcModule<S,T>
-
- Direct Known Subclasses:
CollectorClientRpcModule
,DetectorClientRpcModule
,DnsLookupClientRpcModule
,EchoRpcModule
,HealthTrackingEchoRpcModule
,PingProxyRpcModule
,PingSweepRpcModule
,PollerClientRpcModule
,RequisitionRpcModule
,SnmpProxyRpcModule
public abstract class AbstractXmlRpcModule<S extends RpcRequest,T extends RpcResponse> extends Object implements RpcModule<S,T>
RpcModule
that uses JaxbUtils for marshaling and unmarshaling requests.- Author:
- jwhite
-
-
Field Summary
-
Fields inherited from interface org.opennms.core.rpc.api.RpcModule
MINION_HEADERS_MODULE
-
-
Constructor Summary
Constructors Constructor Description AbstractXmlRpcModule(Class<S> requestClazz, Class<T> responseClazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
marshalRequest(S request)
Marshals the request to a string.String
marshalResponse(T response)
Marshals the response to a string.S
unmarshalRequest(String requestXml)
Unmarshals the request from a string.T
unmarshalResponse(String response)
Unmarshals the response from a string.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.core.rpc.api.RpcModule
createResponseWithException, getId
-
-
-
-
Method Detail
-
marshalRequest
public String marshalRequest(S request)
Description copied from interface:RpcModule
Marshals the request to a string.- Specified by:
marshalRequest
in interfaceRpcModule<S extends RpcRequest,T extends RpcResponse>
-
unmarshalRequest
public S unmarshalRequest(String requestXml)
Description copied from interface:RpcModule
Unmarshals the request from a string.- Specified by:
unmarshalRequest
in interfaceRpcModule<S extends RpcRequest,T extends RpcResponse>
-
marshalResponse
public String marshalResponse(T response)
Description copied from interface:RpcModule
Marshals the response to a string.- Specified by:
marshalResponse
in interfaceRpcModule<S extends RpcRequest,T extends RpcResponse>
-
unmarshalResponse
public T unmarshalResponse(String response)
Description copied from interface:RpcModule
Unmarshals the response from a string.- Specified by:
unmarshalResponse
in interfaceRpcModule<S extends RpcRequest,T extends RpcResponse>
-
-