@Override //RpcInvocationHandler public ConnectionId getConnectionId() { return RPC.getConnectionIdForProxy(proxyDescriptor.getProxy()); } }
/** * Returns the server address for a given proxy. */ public static InetSocketAddress getServerAddress(Object proxy) { return getConnectionIdForProxy(proxy).getAddress(); }
@Override //RpcInvocationHandler public ConnectionId getConnectionId() { return RPC.getConnectionIdForProxy(currentProxy.proxy); }
@Override //RpcInvocationHandler public ConnectionId getConnectionId() { return RPC.getConnectionIdForProxy(currentProxy.proxy); }
@Override //RpcInvocationHandler public ConnectionId getConnectionId() { return RPC.getConnectionIdForProxy(currentProxy.proxy); }
/** * Returns the server address for a given proxy. */ public static InetSocketAddress getServerAddress(Object proxy) { return getConnectionIdForProxy(proxy).getAddress(); }
/** * Returns the server address for a given proxy. */ public static InetSocketAddress getServerAddress(Object proxy) { return getConnectionIdForProxy(proxy).getAddress(); }
/** * Returns the server address for a given proxy. */ public static InetSocketAddress getServerAddress(Object proxy) { return getConnectionIdForProxy(proxy).getAddress(); }
@Override //RpcInvocationHandler public ConnectionId getConnectionId() { return RPC.getConnectionIdForProxy(proxyDescriptor.getProxy()); } }
/** * Returns the server address for a given proxy. */ public static InetSocketAddress getServerAddress(Object proxy) { return getConnectionIdForProxy(proxy).getAddress(); }
private void doDigestRpc(Server server, TestTokenSecretManager sm ) throws Exception { server.start(); final UserGroupInformation current = UserGroupInformation.getCurrentUser(); final InetSocketAddress addr = NetUtils.getConnectAddress(server); TestTokenIdentifier tokenId = new TestTokenIdentifier(new Text(current .getUserName())); Token<TestTokenIdentifier> token = new Token<TestTokenIdentifier>(tokenId, sm); SecurityUtil.setTokenService(token, addr); current.addToken(token); TestSaslProtocol proxy = null; try { proxy = RPC.getProxy(TestSaslProtocol.class, TestSaslProtocol.versionID, addr, conf); AuthMethod authMethod = proxy.getAuthMethod(); assertEquals(TOKEN, authMethod); //QOP must be auth assertEquals(expectedQop.saslQop, RPC.getConnectionIdForProxy(proxy).getSaslQop()); proxy.ping(); } finally { server.stop(); if (proxy != null) { RPC.stopProxy(proxy); } } }
private void doDigestRpc(Server server, TestTokenSecretManager sm ) throws Exception { server.start(); final UserGroupInformation current = UserGroupInformation.getCurrentUser(); final InetSocketAddress addr = NetUtils.getConnectAddress(server); TestTokenIdentifier tokenId = new TestTokenIdentifier(new Text(current .getUserName())); Token<TestTokenIdentifier> token = new Token<TestTokenIdentifier>(tokenId, sm); SecurityUtil.setTokenService(token, addr); current.addToken(token); TestSaslProtocol proxy = null; try { proxy = RPC.getProxy(TestSaslProtocol.class, TestSaslProtocol.versionID, addr, conf); AuthMethod authMethod = proxy.getAuthMethod(); assertEquals(TOKEN, authMethod); //QOP must be auth assertEquals(expectedQop.saslQop, RPC.getConnectionIdForProxy(proxy).getSaslQop()); proxy.ping(); } finally { server.stop(); if (proxy != null) { RPC.stopProxy(proxy); } } }
@Override public String run() throws IOException { TestSaslProtocol proxy = null; try { proxy = RPC.getProxy(TestSaslProtocol.class, TestSaslProtocol.versionID, addr, clientConf); proxy.ping(); // make sure the other side thinks we are who we said we are!!! assertEquals(clientUgi.getUserName(), proxy.getAuthUser()); AuthMethod authMethod = proxy.getAuthMethod(); // verify sasl completed with correct QOP assertEquals((authMethod != SIMPLE) ? expectedQop.saslQop : null, RPC.getConnectionIdForProxy(proxy).getSaslQop()); return authMethod.toString(); } finally { if (proxy != null) { RPC.stopProxy(proxy); } } } });
@Override public String run() throws IOException { TestSaslProtocol proxy = null; try { proxy = RPC.getProxy(TestSaslProtocol.class, TestSaslProtocol.versionID, addr, clientConf); proxy.ping(); // make sure the other side thinks we are who we said we are!!! assertEquals(clientUgi.getUserName(), proxy.getAuthUser()); AuthMethod authMethod = proxy.getAuthMethod(); // verify sasl completed with correct QOP assertEquals((authMethod != SIMPLE) ? expectedQop.saslQop : null, RPC.getConnectionIdForProxy(proxy).getSaslQop()); return authMethod.toString(); } finally { if (proxy != null) { RPC.stopProxy(proxy); } } } });
RPC.getConnectionIdForProxy(proxy1), RPC.getConnectionIdForProxy(proxy2), RPC.getConnectionIdForProxy(proxy3) }; assertEquals(connsArray[0], connsArray[1]);
RPC.getConnectionIdForProxy(proxy1), RPC.getConnectionIdForProxy(proxy2), RPC.getConnectionIdForProxy(proxy3) }; assertEquals(connsArray[0], connsArray[1]);