Package org.opennms.netmgt.icmp.proxy
Class PingProxyRpcModule
- java.lang.Object
-
- org.opennms.core.rpc.xml.AbstractXmlRpcModule<PingRequestDTO,PingResponseDTO>
-
- org.opennms.netmgt.icmp.proxy.PingProxyRpcModule
-
- All Implemented Interfaces:
RpcClient<PingRequestDTO,PingResponseDTO>
,RpcModule<PingRequestDTO,PingResponseDTO>
@Component public class PingProxyRpcModule extends AbstractXmlRpcModule<PingRequestDTO,PingResponseDTO>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
RPC_MODULE_ID
-
Fields inherited from interface org.opennms.core.rpc.api.RpcModule
MINION_HEADERS_MODULE
-
-
Constructor Summary
Constructors Constructor Description PingProxyRpcModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PingResponseDTO
createResponseWithException(java.lang.Throwable ex)
Called when theRpcModule
throws an exception while executing a request.java.util.concurrent.CompletableFuture<PingResponseDTO>
execute(PingRequestDTO request)
java.lang.String
getId()
Used to route the request/responses to the appropriate module.void
setPingerFactory(PingerFactory pingerFactory)
-
Methods inherited from class org.opennms.core.rpc.xml.AbstractXmlRpcModule
marshalRequest, marshalResponse, unmarshalRequest, unmarshalResponse
-
-
-
-
Field Detail
-
RPC_MODULE_ID
public static final java.lang.String RPC_MODULE_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
execute
public java.util.concurrent.CompletableFuture<PingResponseDTO> execute(PingRequestDTO request)
-
getId
public java.lang.String getId()
Description copied from interface:RpcModule
Used to route the request/responses to the appropriate module. This ID should be unique for every RpcModule implementation.
-
setPingerFactory
public void setPingerFactory(PingerFactory pingerFactory)
-
createResponseWithException
public PingResponseDTO createResponseWithException(java.lang.Throwable ex)
Description copied from interface:RpcModule
Called when theRpcModule
throws an exception while executing a request. This function should return a newRpcResponse
that stores a string-based representation of the exception that occurred and make this available viaRpcResponse.getErrorMessage()
once un-marshaled.- Parameters:
ex
- the exception that occurred- Returns:
- a
RpcResponse
that stores the exception
-
-