public abstract class NettyClientBase extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected Class<?> |
protocol |
protected AtomicInteger |
sequence |
| Constructor and Description |
|---|
NettyClientBase(org.apache.tajo.rpc.RpcClientManager.RpcConnectionKey rpcConnectionKey,
int numRetries) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
connect() |
io.netty.channel.Channel |
getChannel() |
org.apache.tajo.rpc.RpcClientManager.RpcConnectionKey |
getKey() |
SocketAddress |
getRemoteAddress() |
protected Class<?> |
getServiceClass() |
abstract <T> T |
getStub() |
protected <T> T |
getStub(Method stubMethod,
Object rpcChannel) |
protected void |
init(io.netty.channel.ChannelInitializer<io.netty.channel.Channel> initializer) |
boolean |
isConnected() |
protected final Class<?> protocol
protected final AtomicInteger sequence
public NettyClientBase(org.apache.tajo.rpc.RpcClientManager.RpcConnectionKey rpcConnectionKey,
int numRetries)
throws ClassNotFoundException,
NoSuchMethodException
protected void init(io.netty.channel.ChannelInitializer<io.netty.channel.Channel> initializer)
public org.apache.tajo.rpc.RpcClientManager.RpcConnectionKey getKey()
protected final Class<?> getServiceClass() throws ClassNotFoundException
ClassNotFoundExceptionpublic abstract <T> T getStub()
public void connect()
throws io.netty.channel.ConnectTimeoutException
io.netty.channel.ConnectTimeoutExceptionpublic io.netty.channel.Channel getChannel()
public boolean isConnected()
public SocketAddress getRemoteAddress()
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2015 Apache Software Foundation. All Rights Reserved.