Netty: add getter for channel in NettyTransportChannel

Adds a getter for the actual netty channel in NettyTransportChannel. The
channel can be used by plugins that need access into netty when processing
requests.
This commit is contained in:
jaymode 2015-03-30 09:26:06 -04:00
parent 77418ecdbd
commit a2addaf320
1 changed files with 10 additions and 0 deletions

View File

@ -140,4 +140,14 @@ public class NettyTransportChannel implements TransportChannel {
channel.write(buffer);
transportServiceAdapter.onResponseSent(requestId, action, error);
}
/**
* Returns the underlying netty channel. This method is intended be used for access to netty to get additional
* details when processing the request and may be used by plugins. Responses should be sent using the methods
* defined in this class and not directly on the channel.
* @return underlying netty channel
*/
public Channel getChannel() {
return channel;
}
}