You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "David Mollitor (Jira)" <ji...@apache.org> on 2021/02/03 21:58:00 UTC
[jira] [Created] (THRIFT-5345) Allow the ServerContext to be
Unwrapped Programmatically
David Mollitor created THRIFT-5345:
--------------------------------------
Summary: Allow the ServerContext to be Unwrapped Programmatically
Key: THRIFT-5345
URL: https://issues.apache.org/jira/browse/THRIFT-5345
Project: Thrift
Issue Type: Improvement
Components: Java - Library
Reporter: David Mollitor
Assignee: David Mollitor
From Apache Hive:
{code:java}
public void deleteContext(ServerContext serverContext, TProtocol input, TProtocol output) {
...
ThriftCLIServerContext context = (ThriftCLIServerContext) serverContext;
}
{code}
This proposed change allows for a cleaner approach:
{code:java}
public void deleteContext(ServerContext serverContext, TProtocol input, TProtocol output) {
...
ThriftCLIServerContext context = serverContext.unwrap(ThriftCLIServerContext.class);
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)