@Override protected Object call() throws Exception { final ProxyService proxyService = clientEngine.getProxyService(); final String registrationId = proxyService.addProxyListener(this); endpoint.addDestroyAction(registrationId, new Callable() { @Override public Boolean call() { return proxyService.removeProxyListener(registrationId); } }); return registrationId; }
@Override protected Object call() throws Exception { final ProxyService proxyService = clientEngine.getProxyService(); final String registrationId = proxyService.addProxyListener(this); endpoint.addDestroyAction(registrationId, new Callable() { @Override public Boolean call() { return proxyService.removeProxyListener(registrationId); } }); return registrationId; }
@Override protected Object call() { final CacheService service = getService(CacheService.SERVICE_NAME); CacheEntryListener cacheEntryListener = new CacheEntryListener(endpoint, this); final String registrationId = service.registerListener(parameters.name, cacheEntryListener, cacheEntryListener, parameters.localOnly); endpoint.addDestroyAction(registrationId, new Callable<Boolean>() { @Override public Boolean call() throws Exception { return service.deregisterListener(parameters.name, registrationId); } }); return registrationId; }
@Override protected Object call() { final CacheService service = getService(CacheService.SERVICE_NAME); CacheEntryListener cacheEntryListener = new CacheEntryListener(endpoint, this); final String registrationId = service.registerListener(parameters.name, cacheEntryListener, cacheEntryListener, parameters.localOnly); endpoint.addDestroyAction(registrationId, new Callable<Boolean>() { @Override public Boolean call() throws Exception { return service.deregisterListener(parameters.name, registrationId); } }); return registrationId; }
@Override protected Object call() { InternalPartitionService internalPartitionService = getService(InternalPartitionService.SERVICE_NAME); internalPartitionService.firstArrangement(); final ClientPartitionListenerService service = clientEngine.getPartitionListenerService(); service.registerPartitionListener(endpoint, clientMessage.getCorrelationId()); endpoint.addDestroyAction(UuidUtil.newUnsecureUUID().toString(), new Callable<Boolean>() { @Override public Boolean call() throws Exception { service.deregisterPartitionListener(endpoint); return Boolean.TRUE; } }); return true; }
@Override protected Object call() { InternalPartitionService internalPartitionService = getService(InternalPartitionService.SERVICE_NAME); internalPartitionService.firstArrangement(); final ClientPartitionListenerService service = clientEngine.getPartitionListenerService(); service.registerPartitionListener(endpoint, clientMessage.getCorrelationId()); endpoint.addDestroyAction(UuidUtil.newUnsecureUUID().toString(), new Callable<Boolean>() { @Override public Boolean call() throws Exception { service.deregisterPartitionListener(endpoint); return Boolean.TRUE; } }); return true; }