@InterfaceAudience.Private public class AsyncRpcChannel extends Object
| Modifier and Type | Field and Description |
|---|---|
static Log |
LOG |
protected static Map<AuthenticationProtos.TokenIdentifier.Kind,<any>> |
tokenHandlers |
| Constructor and Description |
|---|
AsyncRpcChannel(Bootstrap bootstrap,
AsyncRpcClient client,
User ticket,
String serviceName,
InetSocketAddress address)
Constructor for netty RPC channel
|
| Modifier and Type | Method and Description |
|---|---|
<any> |
callMethod(Descriptors.MethodDescriptor method,
PayloadCarryingRpcController controller,
Message request,
Message responsePrototype)
Calls method on channel
|
void |
close(Throwable e)
Close connection
|
int |
getConnectionHashCode() |
boolean |
isAlive()
Check if the connection is alive
|
String |
toString() |
public static final Log LOG
protected static final Map<AuthenticationProtos.TokenIdentifier.Kind,<any>> tokenHandlers
public AsyncRpcChannel(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 <any> callMethod(Descriptors.MethodDescriptor method,
PayloadCarryingRpcController controller,
Message request,
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()