@InterfaceAudience.Private public class AsyncRpcChannel extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static Log |
LOG |
protected static java.util.Map<AuthenticationProtos.TokenIdentifier.Kind,<any>> |
tokenHandlers |
| Constructor and Description |
|---|
AsyncRpcChannel(Bootstrap bootstrap,
AsyncRpcClient client,
User ticket,
java.lang.String serviceName,
java.net.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(java.lang.Throwable e)
Close connection
|
boolean |
equals(java.lang.Object obj) |
int |
getConnectionHashCode() |
int |
hashCode() |
boolean |
isAlive()
Check if the connection is alive
|
java.lang.String |
toString() |
public static final Log LOG
protected static final java.util.Map<AuthenticationProtos.TokenIdentifier.Kind,<any>> tokenHandlers
public AsyncRpcChannel(Bootstrap bootstrap,
AsyncRpcClient client,
User ticket,
java.lang.String serviceName,
java.net.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(java.lang.Throwable e)
e - exception on closepublic boolean isAlive()
public int getConnectionHashCode()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object