@ThreadSafe public class ThriftServiceProcessor extends Object implements com.facebook.nifty.processor.NiftyProcessor
| Constructor and Description |
|---|
ThriftServiceProcessor(ThriftCodecManager codecManager,
List<? extends ThriftEventHandler> eventHandlers,
List<?> services) |
ThriftServiceProcessor(ThriftCodecManager codecManager,
List<? extends ThriftEventHandler> eventHandlers,
Object... services) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,ThriftMethodProcessor> |
getMethods() |
com.google.common.util.concurrent.ListenableFuture<Boolean> |
process(org.apache.thrift.protocol.TProtocol in,
org.apache.thrift.protocol.TProtocol out,
com.facebook.nifty.core.RequestContext requestContext) |
static org.apache.thrift.TApplicationException |
writeApplicationException(org.apache.thrift.protocol.TProtocol outputProtocol,
com.facebook.nifty.core.TNiftyTransport requestTransport,
String methodName,
int sequenceId,
int errorCode,
String errorMessage,
Throwable cause) |
public ThriftServiceProcessor(ThriftCodecManager codecManager, List<? extends ThriftEventHandler> eventHandlers, Object... services)
eventHandlers - event handlers to attach to servicesservices - the services to expose; services must be thread safepublic ThriftServiceProcessor(ThriftCodecManager codecManager, List<? extends ThriftEventHandler> eventHandlers, List<?> services)
public Map<String,ThriftMethodProcessor> getMethods()
public com.google.common.util.concurrent.ListenableFuture<Boolean> process(org.apache.thrift.protocol.TProtocol in, org.apache.thrift.protocol.TProtocol out, com.facebook.nifty.core.RequestContext requestContext) throws org.apache.thrift.TException
process in interface com.facebook.nifty.processor.NiftyProcessororg.apache.thrift.TExceptionpublic static org.apache.thrift.TApplicationException writeApplicationException(org.apache.thrift.protocol.TProtocol outputProtocol,
com.facebook.nifty.core.TNiftyTransport requestTransport,
String methodName,
int sequenceId,
int errorCode,
String errorMessage,
Throwable cause)
throws org.apache.thrift.TException
org.apache.thrift.TExceptionCopyright © 2012-2016 Facebook, Inc.. All Rights Reserved.