@Test public void testUnfencedRemoteGateway() throws Exception { final UUID initialFencingToken = UUID.randomUUID(); final String value = "foobar"; final FencedTestingEndpoint fencedTestingEndpoint = new FencedTestingEndpoint(rpcService, value, initialFencingToken); try { fencedTestingEndpoint.start(); FencedTestingGateway unfencedGateway = rpcService.connect(fencedTestingEndpoint.getAddress(), FencedTestingGateway.class) .get(timeout.toMilliseconds(), TimeUnit.MILLISECONDS); try { unfencedGateway.foobar(timeout).get(timeout.toMilliseconds(), TimeUnit.MILLISECONDS); fail("This should have failed because we have an unfenced gateway."); } catch (ExecutionException e) { assertTrue(ExceptionUtils.stripExecutionException(e) instanceof RpcException); } try { unfencedGateway.getFencingToken(); fail("We should not be able to call getFencingToken on an unfenced gateway."); } catch (UnsupportedOperationException ignored) { } } finally { RpcUtils.terminateRpcEndpoint(fencedTestingEndpoint, timeout); } }
public F getFencingToken() { return fencingToken; }
FencedRpcEndpoint extends RpcEndpoint { public F getFencingToken() { return fencingToken; } }
FencedRpcEndpoint extends RpcEndpoint { public F getFencingToken() { return fencingToken; } protected  FencedRpcEndpoint(RpcService rpcService, String endpointId); protected  FencedRpcEndpoint(RpcService rpcService); }
FencedRpcEndpoint extends RpcEndpoint { public F getFencingToken() { return fencingToken; } protected  FencedRpcEndpoint(RpcService rpcService, String endpointId); protected  FencedRpcEndpoint(RpcService rpcService); F getFencingToken(); }
FencedRpcEndpoint extends RpcEndpoint { public F getFencingToken() { return fencingToken; } protected  FencedRpcEndpoint(RpcService rpcService, String endpointId); protected  FencedRpcEndpoint(RpcService rpcService); F getFencingToken();  }