Class SnmpProxyRpcModule
- java.lang.Object
 - 
- org.opennms.core.rpc.xml.AbstractXmlRpcModule<SnmpRequestDTO,SnmpMultiResponseDTO>
 - 
- org.opennms.netmgt.snmp.proxy.common.SnmpProxyRpcModule
 
 
 
- 
- All Implemented Interfaces:
 RpcClient<SnmpRequestDTO,SnmpMultiResponseDTO>,RpcModule<SnmpRequestDTO,SnmpMultiResponseDTO>
public class SnmpProxyRpcModule extends AbstractXmlRpcModule<SnmpRequestDTO,SnmpMultiResponseDTO>
Executes SNMP requests locally using the currentSnmpStrategy.- Author:
 - jwhite
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static SnmpProxyRpcModuleINSTANCEstatic StringRPC_MODULE_ID- 
Fields inherited from interface org.opennms.core.rpc.api.RpcModule
MINION_HEADERS_MODULE 
 - 
 
- 
Constructor Summary
Constructors Constructor Description SnmpProxyRpcModule() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SnmpMultiResponseDTOcreateResponseWithException(Throwable ex)Called when theRpcModulethrows an exception while executing a request.CompletableFuture<SnmpMultiResponseDTO>execute(SnmpRequestDTO request)StringgetId()Used to route the request/responses to the appropriate module.- 
Methods inherited from class org.opennms.core.rpc.xml.AbstractXmlRpcModule
marshalRequest, marshalResponse, unmarshalRequest, unmarshalResponse 
 - 
 
 - 
 
- 
- 
Field Detail
- 
INSTANCE
public static final SnmpProxyRpcModule INSTANCE
 
- 
RPC_MODULE_ID
public static final String RPC_MODULE_ID
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
execute
public CompletableFuture<SnmpMultiResponseDTO> execute(SnmpRequestDTO request)
 
- 
createResponseWithException
public SnmpMultiResponseDTO createResponseWithException(Throwable ex)
Description copied from interface:RpcModuleCalled when theRpcModulethrows an exception while executing a request. This function should return a newRpcResponsethat 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 
RpcResponsethat stores the exception 
 
 - 
 
 -