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 java.lang.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(java.lang.Class<S> requestClazz, java.lang.Class<T> responseClazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
marshalRequest(S request)
Marshals the request to a string.java.lang.String
marshalResponse(T response)
Marshals the response to a string.S
unmarshalRequest(java.lang.String requestXml)
Unmarshals the request from a string.T
unmarshalResponse(java.lang.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 java.lang.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(java.lang.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 java.lang.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(java.lang.String response)
Description copied from interface:RpcModule
Unmarshals the response from a string.- Specified by:
unmarshalResponse
in interfaceRpcModule<S extends RpcRequest,T extends RpcResponse>
-
-