/** * Wrap the given application handler in a SaslRpcHandler that will handle the initial SASL * negotiation. */ public RpcHandler doBootstrap(Channel channel, RpcHandler rpcHandler) { return new SaslRpcHandler(conf, channel, rpcHandler, secretKeyHolder); }
/** * Wrap the given application handler in a SaslRpcHandler that will handle the initial SASL * negotiation. */ public RpcHandler doBootstrap(Channel channel, RpcHandler rpcHandler) { return new SaslRpcHandler(conf, channel, rpcHandler, secretKeyHolder); }
/** * Wrap the given application handler in a SaslRpcHandler that will handle the initial SASL * negotiation. */ public RpcHandler doBootstrap(Channel channel, RpcHandler rpcHandler) { return new SaslRpcHandler(conf, channel, rpcHandler, secretKeyHolder); }
/** * Wrap the given application handler in a SaslRpcHandler that will handle the initial SASL * negotiation. */ public RpcHandler doBootstrap(Channel channel, RpcHandler rpcHandler) { return new SaslRpcHandler(conf, channel, rpcHandler, secretKeyHolder); }
LOG.warn("Failed to parse new auth challenge, reverting to SASL for client {}.", channel.remoteAddress()); delegate = new SaslRpcHandler(conf, channel, delegate, secretKeyHolder); message.position(position); message.limit(limit);
LOG.warn("Failed to parse new auth challenge, reverting to SASL for client {}.", channel.remoteAddress()); delegate = new SaslRpcHandler(conf, channel, delegate, secretKeyHolder); message.position(position); message.limit(limit);
LOG.warn("Failed to parse new auth challenge, reverting to SASL for client {}.", channel.remoteAddress()); delegate = new SaslRpcHandler(conf, channel, delegate, secretKeyHolder); message.position(position); message.limit(limit);
@Test public void testRpcHandlerDelegate() throws Exception { // Tests all delegates exception for receive(), which is more complicated and already handled // by all other tests. RpcHandler handler = mock(RpcHandler.class); RpcHandler saslHandler = new SaslRpcHandler(null, null, handler, null); saslHandler.getStreamManager(); verify(handler).getStreamManager(); saslHandler.channelInactive(null); verify(handler).channelInactive(any(TransportClient.class)); saslHandler.exceptionCaught(null, null); verify(handler).exceptionCaught(any(Throwable.class), any(TransportClient.class)); }
@Test public void testRpcHandlerDelegate() throws Exception { // Tests all delegates exception for receive(), which is more complicated and already handled // by all other tests. RpcHandler handler = mock(RpcHandler.class); RpcHandler saslHandler = new SaslRpcHandler(null, null, handler, null); saslHandler.getStreamManager(); verify(handler).getStreamManager(); saslHandler.channelInactive(null); verify(handler).channelInactive(any(TransportClient.class)); saslHandler.exceptionCaught(null, null); verify(handler).exceptionCaught(any(Throwable.class), any(TransportClient.class)); }