Class CollectorClientRpcModule
- java.lang.Object
-
- org.opennms.core.rpc.xml.AbstractXmlRpcModule<CollectorRequestDTO,CollectorResponseDTO>
-
- org.opennms.netmgt.collection.client.rpc.CollectorClientRpcModule
-
- All Implemented Interfaces:
RpcClient<CollectorRequestDTO,CollectorResponseDTO>
,RpcModule<CollectorRequestDTO,CollectorResponseDTO>
public class CollectorClientRpcModule extends AbstractXmlRpcModule<CollectorRequestDTO,CollectorResponseDTO>
Used to perform collections viaServiceCollector
s.- Author:
- jwhite
-
-
Field Summary
Fields Modifier and Type Field Description static String
RPC_MODULE_ID
-
Fields inherited from interface org.opennms.core.rpc.api.RpcModule
MINION_HEADERS_MODULE
-
-
Constructor Summary
Constructors Constructor Description CollectorClientRpcModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectorResponseDTO
createResponseWithException(Throwable ex)
Called when theRpcModule
throws an exception while executing a request.CompletableFuture<CollectorResponseDTO>
execute(CollectorRequestDTO request)
String
getId()
Used to route the request/responses to the appropriate module.ServiceCollectorRegistry
getServiceCollectorRegistry()
void
setExecutor(Executor executor)
void
setServiceCollectorRegistry(ServiceCollectorRegistry serviceCollectorRegistry)
-
Methods inherited from class org.opennms.core.rpc.xml.AbstractXmlRpcModule
marshalRequest, marshalResponse, unmarshalRequest, unmarshalResponse
-
-
-
-
Field Detail
-
RPC_MODULE_ID
public static final String RPC_MODULE_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public 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.
-
execute
public CompletableFuture<CollectorResponseDTO> execute(CollectorRequestDTO request)
-
setServiceCollectorRegistry
public void setServiceCollectorRegistry(ServiceCollectorRegistry serviceCollectorRegistry)
-
getServiceCollectorRegistry
public ServiceCollectorRegistry getServiceCollectorRegistry()
-
setExecutor
public void setExecutor(Executor executor)
-
createResponseWithException
public CollectorResponseDTO createResponseWithException(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
-
-