public final class ThriftUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
constructAsyncClientInstance(String packageName,
String serviceName,
org.apache.thrift.transport.TNonblockingTransport transport,
ThriftExchangeProtocol exchangeProtocol,
org.apache.camel.CamelContext context) |
static Object |
constructClientInstance(String packageName,
String serviceName,
org.apache.thrift.transport.TTransport transport,
ThriftExchangeProtocol exchangeProtocol,
ThriftNegotiationType negotiationType,
ThriftCompressionType compressionType,
org.apache.camel.CamelContext context) |
static Object |
constructServerProcessor(String packageName,
String serviceName,
Object serverImplementation,
boolean isSyncProcessor,
org.apache.camel.CamelContext context) |
static String |
extractServiceName(String service) |
static String |
extractServicePackage(String service) |
static Class |
findMethodReturnType(Class clazz,
String name)
The function find onComplete method inside interface implementation and
get fist parameter (but not Object.class) as return type
|
static Class |
getServerInterface(String packageName,
String serviceName,
boolean isSyncInterface,
org.apache.camel.CamelContext context) |
static void |
invokeAsyncMethod(Object asyncClient,
String invokeMethod,
Object request,
AsyncClientMethodCallback methodCallback) |
static Object |
invokeSyncMethod(Object syncClient,
String invokeMethod,
Object request) |
public static Object constructClientInstance(String packageName, String serviceName, org.apache.thrift.transport.TTransport transport, ThriftExchangeProtocol exchangeProtocol, ThriftNegotiationType negotiationType, ThriftCompressionType compressionType, org.apache.camel.CamelContext context)
public static Object constructAsyncClientInstance(String packageName, String serviceName, org.apache.thrift.transport.TNonblockingTransport transport, ThriftExchangeProtocol exchangeProtocol, org.apache.camel.CamelContext context)
public static Object invokeSyncMethod(Object syncClient, String invokeMethod, Object request)
public static void invokeAsyncMethod(Object asyncClient, String invokeMethod, Object request, AsyncClientMethodCallback methodCallback)
public static Class getServerInterface(String packageName, String serviceName, boolean isSyncInterface, org.apache.camel.CamelContext context)
public static Object constructServerProcessor(String packageName, String serviceName, Object serverImplementation, boolean isSyncProcessor, org.apache.camel.CamelContext context)
Apache Camel