@InterfaceAudience.Private public class AsyncRpcChannel extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
protected static Map<AuthenticationProtos.TokenIdentifier.Kind,org.apache.hadoop.security.token.TokenSelector<? extends org.apache.hadoop.security.token.TokenIdentifier>> |
tokenHandlers |
Constructor and Description |
---|
AsyncRpcChannel(io.netty.bootstrap.Bootstrap bootstrap,
AsyncRpcClient client,
User ticket,
String serviceName,
InetSocketAddress address)
Constructor for netty RPC channel
|
Modifier and Type | Method and Description |
---|---|
io.netty.util.concurrent.Promise<com.google.protobuf.Message> |
callMethod(com.google.protobuf.Descriptors.MethodDescriptor method,
PayloadCarryingRpcController controller,
com.google.protobuf.Message request,
com.google.protobuf.Message responsePrototype)
Calls method on channel
|
void |
close(Throwable e)
Close connection
|
boolean |
equals(Object obj) |
int |
getConnectionHashCode() |
int |
hashCode() |
boolean |
isAlive()
Check if the connection is alive
|
String |
toString() |
public static final org.apache.commons.logging.Log LOG
protected static final Map<AuthenticationProtos.TokenIdentifier.Kind,org.apache.hadoop.security.token.TokenSelector<? extends org.apache.hadoop.security.token.TokenIdentifier>> tokenHandlers
public AsyncRpcChannel(io.netty.bootstrap.Bootstrap bootstrap, AsyncRpcClient client, User ticket, String serviceName, InetSocketAddress address)
bootstrap
- to construct channel onclient
- to connect withticket
- of user which uses connectionserviceName
- name of service to connect toaddress
- to connect topublic io.netty.util.concurrent.Promise<com.google.protobuf.Message> callMethod(com.google.protobuf.Descriptors.MethodDescriptor method, PayloadCarryingRpcController controller, com.google.protobuf.Message request, com.google.protobuf.Message responsePrototype)
method
- to callcontroller
- to run call withrequest
- to sendresponsePrototype
- to construct response withpublic void close(Throwable e)
e
- exception on closepublic boolean isAlive()
public int getConnectionHashCode()
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.