Package org.apache.drill.exec.rpc
Interface UserClientConnection
- All Known Implementing Classes:
AbstractDisposableUserClientConnection
,BaseWebUserConnection
,StreamingHttpConnection
,UserServer.BitToUserConnection
,WebUserConnection
,WebUserConnection.AnonWebUserConnection
public interface UserClientConnection
Interface for getting user session properties and interacting with user
connection. Separating this interface from
AbstractRemoteConnection
implementation for user connection:
- Connection is passed to Foreman and Screen operators. Instead passing this interface exposes few details.
- Makes it easy to have wrappers around user connection which can be helpful to tap the messages and data going to the actual client.
-
Method Summary
Modifier and TypeMethodDescriptionio.netty.util.concurrent.Future<Void>
Returns theFuture
which will be notified when this channel is closed.void
sendData
(RpcOutcomeListener<GeneralRPCProtos.Ack> listener, QueryDataPackage data) Send query data to client.void
sendResult
(RpcOutcomeListener<GeneralRPCProtos.Ack> listener, UserBitShared.QueryResult result) Send query result outcome to client.
-
Method Details
-
getSession
UserSession getSession()- Returns:
- User session object.
-
sendData
Send query data to client. Outcome is returned throughlistener
.- Parameters:
listener
- The listenerdata
- The data to be sent
-
getClosureFuture
io.netty.util.concurrent.Future<Void> getClosureFuture()Returns theFuture
which will be notified when this channel is closed. This method always returns the same future instance. -
getRemoteAddress
SocketAddress getRemoteAddress()- Returns:
- Return the client node address.
-