public class org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec extends java.lang.Object implements org.apache.dubbo.remoting.Codec
{
private final java.util.concurrent.atomic.AtomicInteger thriftSeq;
public void <init>()
{
org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec v;
java.util.concurrent.atomic.AtomicInteger v;
v := @this: org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec;
specialinvoke v.<java.lang.Object: void <init>()>();
v = new java.util.concurrent.atomic.AtomicInteger;
specialinvoke v.<java.util.concurrent.atomic.AtomicInteger: void <init>(int)>(0);
v.<org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec: java.util.concurrent.atomic.AtomicInteger thriftSeq> = v;
return;
}
protected static org.apache.thrift.protocol.TProtocol newProtocol(org.apache.dubbo.common.URL, org.apache.dubbo.remoting.buffer.ChannelBuffer) throws java.io.IOException
{
org.apache.dubbo.remoting.buffer.ChannelBuffer v;
java.io.IOException v;
org.apache.thrift.protocol.TBinaryProtocol v;
org.apache.dubbo.common.URL v;
org.apache.dubbo.remoting.buffer.ChannelBufferOutputStream v;
java.lang.String v, v, v;
org.apache.thrift.transport.TIOStreamTransport v;
boolean v;
v := @parameter: org.apache.dubbo.common.URL;
v := @parameter: org.apache.dubbo.remoting.buffer.ChannelBuffer;
v = virtualinvoke v.<org.apache.dubbo.common.URL: java.lang.String getParameter(java.lang.String,java.lang.String)>("thrift.protocol", "binary");
v = "binary";
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>(v);
if v == 0 goto label;
v = new org.apache.thrift.protocol.TBinaryProtocol;
v = new org.apache.thrift.transport.TIOStreamTransport;
v = new org.apache.dubbo.remoting.buffer.ChannelBufferOutputStream;
specialinvoke v.<org.apache.dubbo.remoting.buffer.ChannelBufferOutputStream: void <init>(org.apache.dubbo.remoting.buffer.ChannelBuffer)>(v);
specialinvoke v.<org.apache.thrift.transport.TIOStreamTransport: void <init>(java.io.OutputStream)>(v);
specialinvoke v.<org.apache.thrift.protocol.TBinaryProtocol: void <init>(org.apache.thrift.transport.TTransport)>(v);
return v;
label:
v = new java.io.IOException;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Unsupported protocol type \u0001");
specialinvoke v.<java.io.IOException: void <init>(java.lang.String)>(v);
throw v;
}
public void encode(org.apache.dubbo.remoting.Channel, org.apache.dubbo.remoting.buffer.ChannelBuffer, java.lang.Object) throws java.io.IOException
{
org.apache.dubbo.remoting.buffer.ChannelBuffer v;
java.io.IOException v;
org.apache.dubbo.remoting.Channel v;
java.lang.Class v;
java.lang.Object v;
java.lang.String v, v;
org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec v;
boolean v, v;
v := @this: org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec;
v := @parameter: org.apache.dubbo.remoting.Channel;
v := @parameter: org.apache.dubbo.remoting.buffer.ChannelBuffer;
v := @parameter: java.lang.Object;
v = v instanceof org.apache.dubbo.remoting.exchange.Request;
if v == 0 goto label;
virtualinvoke v.<org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec: void encodeRequest(org.apache.dubbo.remoting.Channel,org.apache.dubbo.remoting.buffer.ChannelBuffer,org.apache.dubbo.remoting.exchange.Request)>(v, v, v);
goto label;
label:
v = v instanceof org.apache.dubbo.remoting.exchange.Response;
if v == 0 goto label;
virtualinvoke v.<org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec: void encodeResponse(org.apache.dubbo.remoting.Channel,org.apache.dubbo.remoting.buffer.ChannelBuffer,org.apache.dubbo.remoting.exchange.Response)>(v, v, v);
goto label;
label:
v = new java.io.IOException;
v = virtualinvoke v.<java.lang.Object: java.lang.Class getClass()>();
v = virtualinvoke v.<java.lang.Class: java.lang.String getName()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Unsupported message type \u0001");
specialinvoke v.<java.io.IOException: void <init>(java.lang.String)>(v);
throw v;
label:
return;
}
protected void encodeRequest(org.apache.dubbo.remoting.Channel, org.apache.dubbo.remoting.buffer.ChannelBuffer, org.apache.dubbo.remoting.exchange.Request) throws java.io.IOException
{
java.lang.Throwable v;
org.apache.dubbo.remoting.exchange.Request v;
org.apache.dubbo.common.URL v;
java.util.concurrent.atomic.AtomicInteger v;
int v, v, v;
java.lang.String v, v, v, v;
org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec v;
org.apache.thrift.protocol.TStruct v;
org.apache.dubbo.remoting.buffer.ChannelBuffer v;
java.lang.Class[] v, v;
java.io.IOException v;
org.apache.dubbo.remoting.Channel v;
org.apache.thrift.protocol.TMessage v;
org.apache.thrift.protocol.TProtocol v;
java.lang.Class v;
java.lang.Object v;
v := @this: org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec;
v := @parameter: org.apache.dubbo.remoting.Channel;
v := @parameter: org.apache.dubbo.remoting.buffer.ChannelBuffer;
v := @parameter: org.apache.dubbo.remoting.exchange.Request;
v = virtualinvoke v.<org.apache.dubbo.remoting.exchange.Request: java.lang.Object getData()>();
v = interfaceinvoke v.<org.apache.dubbo.remoting.Channel: org.apache.dubbo.common.URL getUrl()>();
v = staticinvoke <org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec: org.apache.thrift.protocol.TProtocol newProtocol(org.apache.dubbo.common.URL,org.apache.dubbo.remoting.buffer.ChannelBuffer)>(v, v);
label:
v = new org.apache.thrift.protocol.TMessage;
v = interfaceinvoke v.<org.apache.dubbo.rpc.Invocation: java.lang.String getMethodName()>();
v = v.<org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec: java.util.concurrent.atomic.AtomicInteger thriftSeq>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: int getAndIncrement()>();
specialinvoke v.<org.apache.thrift.protocol.TMessage: void <init>(java.lang.String,byte,int)>(v, 1, v);
virtualinvoke v.<org.apache.thrift.protocol.TProtocol: void writeMessageBegin(org.apache.thrift.protocol.TMessage)>(v);
v = new org.apache.thrift.protocol.TStruct;
v = interfaceinvoke v.<org.apache.dubbo.rpc.Invocation: java.lang.String getMethodName()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u0001_args");
specialinvoke v.<org.apache.thrift.protocol.TStruct: void <init>(java.lang.String)>(v);
virtualinvoke v.<org.apache.thrift.protocol.TProtocol: void writeStructBegin(org.apache.thrift.protocol.TStruct)>(v);
v = 0;
label:
v = interfaceinvoke v.<org.apache.dubbo.rpc.Invocation: java.lang.Class[] getParameterTypes()>();
v = lengthof v;
if v >= v goto label;
v = interfaceinvoke v.<org.apache.dubbo.rpc.Invocation: java.lang.Class[] getParameterTypes()>();
v = v[v];
v = v + 1;
goto label;
label:
v := @caughtexception;
v = new java.io.IOException;
v = virtualinvoke v.<org.apache.thrift.TException: java.lang.String getMessage()>();
specialinvoke v.<java.io.IOException: void <init>(java.lang.String,java.lang.Throwable)>(v, v);
throw v;
label:
return;
catch org.apache.thrift.TException from label to label with label;
}
protected void encodeResponse(org.apache.dubbo.remoting.Channel, org.apache.dubbo.remoting.buffer.ChannelBuffer, org.apache.dubbo.remoting.exchange.Response) throws java.io.IOException
{
org.apache.dubbo.remoting.buffer.ChannelBuffer v;
org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec v;
org.apache.dubbo.remoting.Channel v;
org.apache.dubbo.remoting.exchange.Response v;
v := @this: org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec;
v := @parameter: org.apache.dubbo.remoting.Channel;
v := @parameter: org.apache.dubbo.remoting.buffer.ChannelBuffer;
v := @parameter: org.apache.dubbo.remoting.exchange.Response;
return;
}
public java.lang.Object decode(org.apache.dubbo.remoting.Channel, org.apache.dubbo.remoting.buffer.ChannelBuffer) throws java.io.IOException
{
org.apache.dubbo.remoting.buffer.ChannelBuffer v;
org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec v;
org.apache.dubbo.remoting.Channel v;
v := @this: org.apache.dubbo.rpc.protocol.thrift.ThriftNativeCodec;
v := @parameter: org.apache.dubbo.remoting.Channel;
v := @parameter: org.apache.dubbo.remoting.buffer.ChannelBuffer;
return null;
}
}