@ThreadSafe public class ThriftServiceProcessorCustom extends com.facebook.swift.service.ThriftServiceProcessor
ThriftServiceProcessor
子类,代码基本都是从父类复制过来,
只是在构造方法ThriftServiceProcessorCustom(ThriftCodecManager, List, List)
中
用ThriftMethodProcessorCustom
替换了ThriftMethodProcessor
Constructor and Description |
---|
ThriftServiceProcessorCustom(com.facebook.swift.codec.ThriftCodecManager codecManager,
java.util.List<? extends com.facebook.swift.service.ThriftEventHandler> eventHandlers,
java.util.List<?> services) |
ThriftServiceProcessorCustom(com.facebook.swift.codec.ThriftCodecManager codecManager,
java.util.List<? extends com.facebook.swift.service.ThriftEventHandler> eventHandlers,
java.lang.Object... services) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,com.facebook.swift.service.ThriftMethodProcessor> |
getMethods() |
com.google.common.util.concurrent.ListenableFuture<java.lang.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,
java.lang.String methodName,
int sequenceId,
int errorCode,
java.lang.String errorMessage,
java.lang.Throwable cause) |
public ThriftServiceProcessorCustom(com.facebook.swift.codec.ThriftCodecManager codecManager, java.util.List<? extends com.facebook.swift.service.ThriftEventHandler> eventHandlers, java.lang.Object... services)
eventHandlers
- event handlers to attach to servicesservices
- the services to expose; services must be thread safepublic ThriftServiceProcessorCustom(com.facebook.swift.codec.ThriftCodecManager codecManager, java.util.List<? extends com.facebook.swift.service.ThriftEventHandler> eventHandlers, java.util.List<?> services)
public java.util.Map<java.lang.String,com.facebook.swift.service.ThriftMethodProcessor> getMethods()
getMethods
in class com.facebook.swift.service.ThriftServiceProcessor
public com.google.common.util.concurrent.ListenableFuture<java.lang.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.NiftyProcessor
process
in class com.facebook.swift.service.ThriftServiceProcessor
org.apache.thrift.TException
public static org.apache.thrift.TApplicationException writeApplicationException(org.apache.thrift.protocol.TProtocol outputProtocol, java.lang.String methodName, int sequenceId, int errorCode, java.lang.String errorMessage, java.lang.Throwable cause) throws org.apache.thrift.TException
org.apache.thrift.TException
Copyright © 2019. All rights reserved.