@Override public void afterPropertiesSet() { delegate = rpcClientFactory.getClient(rpcModule); }
@Override public void afterPropertiesSet() { delegate = rpcClientFactory.getClient(pollerClientRpcModule); }
@Override public void afterPropertiesSet() { delegate = rpcClientFactory.getClient(SnmpProxyRpcModule.INSTANCE); }
@Override public void afterPropertiesSet() { delegate = rpcClientFactory.getClient(detectorClientRpcModule); }
@Override public void afterPropertiesSet() { delegate = rpcClientFactory.getClient(dnsLookupClientRpcModule); }
@Override public void afterPropertiesSet() { delegate = rpcClientFactory.getClient(SnmpProxyRpcModule.INSTANCE); }
@Override public void afterPropertiesSet() { delegate = rpcClientFactory.getClient(rpcModule); }
@PostConstruct public void afterPropertiesSet() { delegate = rpcClientFactory.getClient(requisitionRpcModule); }
@Override public void afterPropertiesSet() throws Exception { m_delegate = m_rpcProxy.getClient(new EchoRpcModule()); } }
public ThreadLockingEchoClient(RpcClientFactory rpcClientFactory, ThreadLockingEchoRpcModule threadLockingEchoRpcModule) { m_delegate = rpcClientFactory.getClient(threadLockingEchoRpcModule); }
@Override public Object execute() throws Exception { final RpcClient<EchoRequest, EchoResponse> client = rpcClientFactory.getClient(EchoRpcModule.INSTANCE);
@Override public Object execute() throws Exception { final RpcClient<EchoRequest, EchoResponse> client = rpcClientFactory.getClient(EchoRpcModule.INSTANCE);
@Override public PollStatus poll(final MonitoredService svc, final Map<String, Object> parameters) { Long ttlInMs = ParameterMap.getKeyedLong(parameters, "ttl", DEFAULT_TTL_IN_MS); if (ttlInMs < 1) { // Use the global default ttlInMs = null; } int messageSize = ParameterMap.getKeyedInteger(parameters, "message-size", DEFAULT_MESSAGE_SIZE); if (messageSize < 0) { messageSize = 0; } // Create the client final RpcClient<EchoRequest, EchoResponse> client = rpcClientFactory.get().getClient(EchoRpcModule.INSTANCE); // Build the request final OnmsNode node = nodeDao.get().get(svc.getNodeId()); final EchoRequest request = new EchoRequest(); request.setId(System.currentTimeMillis()); request.setMessage(Strings.repeat("*", messageSize)); request.setLocation(node.getLocation().getLocationName()); request.setSystemId(node.getForeignId()); request.setTimeToLiveMs(ttlInMs); try { final EchoResponse response = client.execute(request).get(); final Long responseTime = System.currentTimeMillis() - response.getId(); return PollStatus.available(responseTime.doubleValue()); } catch (InterruptedException|ExecutionException t) { return RpcExceptionUtils.handleException(t, this); } }