Package org.apache.drill.exec.rpc
Class BasicServer<T extends com.google.protobuf.Internal.EnumLite,SC extends ServerConnection<SC>> 
java.lang.Object
org.apache.drill.exec.rpc.RpcBus<T,SC>
 
org.apache.drill.exec.rpc.BasicServer<T,SC> 
- Type Parameters:
- T- RPC type
- SC- server connection type
- All Implemented Interfaces:
- Closeable,- AutoCloseable
- Direct Known Subclasses:
- ControlServer,- DataServer,- UserServer
public abstract class BasicServer<T extends com.google.protobuf.Internal.EnumLite,SC extends ServerConnection<SC>> 
extends RpcBus<T,SC> 
A server is bound to a port and is responsible for responding to various type of requests. In some cases,
 the inbound requests will generate more than one outbound request.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static classBasicServer.ServerHandshakeHandler<T extends com.google.protobuf.MessageLite>Nested classes/interfaces inherited from class org.apache.drill.exec.rpc.RpcBusRpcBus.ChannelClosedHandler, RpcBus.InboundHandler
- 
Field Summary
- 
Constructor SummaryConstructorsConstructorDescriptionBasicServer(RpcConfig rpcMapping, io.netty.buffer.ByteBufAllocator alloc, io.netty.channel.EventLoopGroup eventLoopGroup) 
- 
Method SummaryModifier and TypeMethodDescriptionintvoidclose()protected voidcloseSSL()protected abstract ProtobufLengthDecodergetDecoder(BufferAllocator allocator, OutOfMemoryHandler outOfMemoryHandler) protected abstract BasicServer.ServerHandshakeHandler<?> getHandshakeHandler(SC connection) protected OutOfMemoryHandlerprotected abstract com.google.protobuf.MessageLitegetResponseDefaultInstance(int rpcType) protected voidhandle(SC connection, int rpcType, io.netty.buffer.ByteBuf pBody, io.netty.buffer.ByteBuf dBody, ResponseSender sender) protected SCinitRemoteConnection(io.netty.channel.socket.SocketChannel channel) protected booleanvoidsetSslChannel(io.netty.channel.Channel c) protected voidsetupSSL(io.netty.channel.ChannelPipeline pipe) Methods inherited from class org.apache.drill.exec.rpc.RpcBusget, getCloseHandler, send, send, send, setAddresses
- 
Constructor Details- 
BasicServerpublic BasicServer(RpcConfig rpcMapping, io.netty.buffer.ByteBufAllocator alloc, io.netty.channel.EventLoopGroup eventLoopGroup) 
 
- 
- 
Method Details- 
setupSSLprotected void setupSSL(io.netty.channel.ChannelPipeline pipe) 
- 
isSslEnabledprotected boolean isSslEnabled()
- 
setSslChannelpublic void setSslChannel(io.netty.channel.Channel c) 
- 
closeSSLprotected void closeSSL()
- 
getOutOfMemoryHandler
- 
getDecoderprotected abstract ProtobufLengthDecoder getDecoder(BufferAllocator allocator, OutOfMemoryHandler outOfMemoryHandler) 
- 
getHandshakeHandler
- 
getResponseDefaultInstanceprotected abstract com.google.protobuf.MessageLite getResponseDefaultInstance(int rpcType) throws RpcException - Specified by:
- getResponseDefaultInstancein class- RpcBus<T extends com.google.protobuf.Internal.EnumLite,- SC extends ServerConnection<SC>> 
- Throws:
- RpcException
 
- 
handleprotected void handle(SC connection, int rpcType, io.netty.buffer.ByteBuf pBody, io.netty.buffer.ByteBuf dBody, ResponseSender sender) throws RpcException - Specified by:
- handlein class- RpcBus<T extends com.google.protobuf.Internal.EnumLite,- SC extends ServerConnection<SC>> 
- Throws:
- RpcException
 
- 
initRemoteConnection- Specified by:
- initRemoteConnectionin class- RpcBus<T extends com.google.protobuf.Internal.EnumLite,- SC extends ServerConnection<SC>> 
 
- 
bind
- 
close- Throws:
- IOException
 
 
-