public class org.apache.dubbo.remoting.transport.netty.NettyClient extends org.apache.dubbo.remoting.transport.AbstractClient
{
private static final org.apache.dubbo.common.logger.Logger logger;
private static final io.netty.channel.EventLoopGroup NIO_EVENT_LOOP_GROUP;
private static final java.lang.String SOCKS_PROXY_HOST;
private static final java.lang.String SOCKS_PROXY_PORT;
private static final java.lang.String DEFAULT_SOCKS_PROXY_PORT;
private io.netty.bootstrap.Bootstrap bootstrap;
private volatile io.netty.channel.Channel channel;
public void <init>(org.apache.dubbo.common.URL, org.apache.dubbo.remoting.ChannelHandler) throws org.apache.dubbo.remoting.RemotingException
{
org.apache.dubbo.remoting.ChannelHandler v, v;
org.apache.dubbo.common.URL v;
org.apache.dubbo.remoting.transport.netty.NettyClient v;
v := @this: org.apache.dubbo.remoting.transport.netty.NettyClient;
v := @parameter: org.apache.dubbo.common.URL;
v := @parameter: org.apache.dubbo.remoting.ChannelHandler;
v = staticinvoke <org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.remoting.ChannelHandler wrapChannelHandler(org.apache.dubbo.common.URL,org.apache.dubbo.remoting.ChannelHandler)>(v, v);
specialinvoke v.<org.apache.dubbo.remoting.transport.AbstractClient: void <init>(org.apache.dubbo.common.URL,org.apache.dubbo.remoting.ChannelHandler)>(v, v);
return;
}
protected void doOpen() throws java.lang.Throwable
{
io.netty.channel.ChannelOption v, v, v, v;
java.lang.Integer v;
org.apache.dubbo.remoting.transport.netty.NettyClient$1 v;
org.apache.dubbo.common.URL v;
int v, v;
io.netty.bootstrap.AbstractBootstrap v, v, v, v;
java.lang.Boolean v, v;
org.apache.dubbo.remoting.transport.netty.NettyClientHandler v;
org.apache.dubbo.remoting.transport.netty.NettyClient v;
io.netty.channel.EventLoopGroup v;
io.netty.buffer.PooledByteBufAllocator v;
io.netty.bootstrap.Bootstrap v, v, v, v;
java.lang.Class v;
v := @this: org.apache.dubbo.remoting.transport.netty.NettyClient;
v = new org.apache.dubbo.remoting.transport.netty.NettyClientHandler;
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.URL getUrl()>();
specialinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClientHandler: void <init>(org.apache.dubbo.common.URL,org.apache.dubbo.remoting.ChannelHandler)>(v, v);
v = new io.netty.bootstrap.Bootstrap;
specialinvoke v.<io.netty.bootstrap.Bootstrap: void <init>()>();
v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.bootstrap.Bootstrap bootstrap> = v;
v = v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.bootstrap.Bootstrap bootstrap>;
v = <org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.EventLoopGroup NIO_EVENT_LOOP_GROUP>;
v = virtualinvoke v.<io.netty.bootstrap.Bootstrap: io.netty.bootstrap.AbstractBootstrap group(io.netty.channel.EventLoopGroup)>(v);
v = <io.netty.channel.ChannelOption: io.netty.channel.ChannelOption SO_KEEPALIVE>;
v = staticinvoke <java.lang.Boolean: java.lang.Boolean valueOf(boolean)>(1);
v = virtualinvoke v.<io.netty.bootstrap.Bootstrap: io.netty.bootstrap.AbstractBootstrap option(io.netty.channel.ChannelOption,java.lang.Object)>(v, v);
v = <io.netty.channel.ChannelOption: io.netty.channel.ChannelOption TCP_NODELAY>;
v = staticinvoke <java.lang.Boolean: java.lang.Boolean valueOf(boolean)>(1);
v = virtualinvoke v.<io.netty.bootstrap.Bootstrap: io.netty.bootstrap.AbstractBootstrap option(io.netty.channel.ChannelOption,java.lang.Object)>(v, v);
v = <io.netty.channel.ChannelOption: io.netty.channel.ChannelOption ALLOCATOR>;
v = <io.netty.buffer.PooledByteBufAllocator: io.netty.buffer.PooledByteBufAllocator DEFAULT>;
v = virtualinvoke v.<io.netty.bootstrap.Bootstrap: io.netty.bootstrap.AbstractBootstrap option(io.netty.channel.ChannelOption,java.lang.Object)>(v, v);
v = staticinvoke <org.apache.dubbo.remoting.transport.netty.NettyEventLoopFactory: java.lang.Class socketChannelClass()>();
virtualinvoke v.<io.netty.bootstrap.Bootstrap: io.netty.bootstrap.AbstractBootstrap channel(java.lang.Class)>(v);
v = v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.bootstrap.Bootstrap bootstrap>;
v = <io.netty.channel.ChannelOption: io.netty.channel.ChannelOption CONNECT_TIMEOUT_MILLIS>;
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: int getConnectTimeout()>();
v = staticinvoke <java.lang.Math: int max(int,int)>(3000, v);
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
virtualinvoke v.<io.netty.bootstrap.Bootstrap: io.netty.bootstrap.AbstractBootstrap option(io.netty.channel.ChannelOption,java.lang.Object)>(v, v);
v = v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.bootstrap.Bootstrap bootstrap>;
v = new org.apache.dubbo.remoting.transport.netty.NettyClient$1;
specialinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient$1: void <init>(org.apache.dubbo.remoting.transport.netty.NettyClient,org.apache.dubbo.remoting.transport.netty.NettyClientHandler)>(v, v);
virtualinvoke v.<io.netty.bootstrap.Bootstrap: io.netty.bootstrap.AbstractBootstrap handler(io.netty.channel.ChannelHandler)>(v);
return;
}
protected void doConnect() throws java.lang.Throwable
{
org.apache.dubbo.remoting.RemotingException v, v;
org.apache.dubbo.common.URL v, v;
boolean v, v, v, v, v, v, v, v, v;
java.net.InetSocketAddress v, v, v;
java.lang.Throwable v, v, v, v, v, v, v, v;
long v, v, v;
int v, v;
java.lang.String v, v, v, v, v, v, v, v;
org.apache.dubbo.remoting.transport.netty.NettyClient v;
org.apache.dubbo.common.logger.Logger v, v, v, v, v, v;
io.netty.channel.ChannelFuture v;
io.netty.channel.Channel v, v;
java.util.concurrent.TimeUnit v;
io.netty.bootstrap.Bootstrap v;
v := @this: org.apache.dubbo.remoting.transport.netty.NettyClient;
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
v = v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.bootstrap.Bootstrap bootstrap>;
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: java.net.InetSocketAddress getConnectAddress()>();
v = virtualinvoke v.<io.netty.bootstrap.Bootstrap: io.netty.channel.ChannelFuture connect(java.net.SocketAddress)>(v);
label:
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: int getConnectTimeout()>();
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit MILLISECONDS>;
v = interfaceinvoke v.<io.netty.channel.ChannelFuture: boolean awaitUninterruptibly(long,java.util.concurrent.TimeUnit)>(v, v);
if v == 0 goto label;
v = interfaceinvoke v.<io.netty.channel.ChannelFuture: boolean isSuccess()>();
if v == 0 goto label;
v = interfaceinvoke v.<io.netty.channel.ChannelFuture: io.netty.channel.Channel channel()>();
label:
v = v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.Channel channel>;
if v == null goto label;
label:
v = <org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.logger.Logger logger>;
v = interfaceinvoke v.<org.apache.dubbo.common.logger.Logger: boolean isInfoEnabled()>();
if v == 0 goto label;
v = <org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.logger.Logger logger>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (io.netty.channel.Channel,io.netty.channel.Channel)>(v, 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[])>("Close old netty channel \u on create new netty channel \u0001");
interfaceinvoke v.<org.apache.dubbo.common.logger.Logger: void info(java.lang.String)>(v);
label:
interfaceinvoke v.<io.netty.channel.Channel: io.netty.channel.ChannelFuture close()>();
label:
staticinvoke <org.apache.dubbo.remoting.transport.netty.NettyChannel: void removeChannelIfDisconnected(io.netty.channel.Channel)>(v);
goto label;
label:
v := @caughtexception;
staticinvoke <org.apache.dubbo.remoting.transport.netty.NettyChannel: void removeChannelIfDisconnected(io.netty.channel.Channel)>(v);
throw v;
label:
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: boolean isClosed()>();
if v == 0 goto label;
label:
v = <org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.logger.Logger logger>;
v = interfaceinvoke v.<org.apache.dubbo.common.logger.Logger: boolean isInfoEnabled()>();
if v == 0 goto label;
v = <org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.logger.Logger logger>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (io.netty.channel.Channel)>(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[])>("Close new netty channel \u, because the client closed.");
interfaceinvoke v.<org.apache.dubbo.common.logger.Logger: void info(java.lang.String)>(v);
label:
interfaceinvoke v.<io.netty.channel.Channel: io.netty.channel.ChannelFuture close()>();
label:
v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.Channel channel> = null;
staticinvoke <org.apache.dubbo.remoting.transport.netty.NettyChannel: void removeChannelIfDisconnected(io.netty.channel.Channel)>(v);
goto label;
label:
v := @caughtexception;
v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.Channel channel> = null;
staticinvoke <org.apache.dubbo.remoting.transport.netty.NettyChannel: void removeChannelIfDisconnected(io.netty.channel.Channel)>(v);
throw v;
label:
v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.Channel channel> = v;
goto label;
label:
v := @caughtexception;
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: boolean isClosed()>();
if v == 0 goto label;
label:
v = <org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.logger.Logger logger>;
v = interfaceinvoke v.<org.apache.dubbo.common.logger.Logger: boolean isInfoEnabled()>();
if v == 0 goto label;
v = <org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.logger.Logger logger>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (io.netty.channel.Channel)>(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[])>("Close new netty channel \u, because the client closed.");
interfaceinvoke v.<org.apache.dubbo.common.logger.Logger: void info(java.lang.String)>(v);
label:
interfaceinvoke v.<io.netty.channel.Channel: io.netty.channel.ChannelFuture close()>();
label:
v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.Channel channel> = null;
staticinvoke <org.apache.dubbo.remoting.transport.netty.NettyChannel: void removeChannelIfDisconnected(io.netty.channel.Channel)>(v);
goto label;
label:
v := @caughtexception;
v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.Channel channel> = null;
staticinvoke <org.apache.dubbo.remoting.transport.netty.NettyChannel: void removeChannelIfDisconnected(io.netty.channel.Channel)>(v);
throw v;
label:
v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.Channel channel> = v;
label:
throw v;
label:
v = interfaceinvoke v.<io.netty.channel.ChannelFuture: java.lang.Throwable cause()>();
if v == null goto label;
v = new org.apache.dubbo.remoting.RemotingException;
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.URL getUrl()>();
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: java.net.InetSocketAddress getRemoteAddress()>();
v = interfaceinvoke v.<io.netty.channel.ChannelFuture: java.lang.Throwable cause()>();
v = virtualinvoke v.<java.lang.Throwable: java.lang.String getMessage()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (org.apache.dubbo.common.URL,java.net.InetSocketAddress,java.lang.String)>(v, v, 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[])>("client(url: \u) failed to connect to server \u, error message is:\u0001");
v = interfaceinvoke v.<io.netty.channel.ChannelFuture: java.lang.Throwable cause()>();
specialinvoke v.<org.apache.dubbo.remoting.RemotingException: void <init>(org.apache.dubbo.remoting.Channel,java.lang.String,java.lang.Throwable)>(v, v, v);
throw v;
label:
v = new org.apache.dubbo.remoting.RemotingException;
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.URL getUrl()>();
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: java.net.InetSocketAddress getRemoteAddress()>();
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: int getConnectTimeout()>();
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
v = v - v;
v = staticinvoke <org.apache.dubbo.common.utils.NetUtils: java.lang.String getLocalHost()>();
v = staticinvoke <org.apache.dubbo.common.Version: java.lang.String getVersion()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (org.apache.dubbo.common.URL,java.net.InetSocketAddress,int,long,java.lang.String,java.lang.String)>(v, v, v, v, v, 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[])>("client(url: \u) failed to connect to server \u client-side timeout \u0001ms (elapsed: \u0001ms) from netty client \u using dubbo version \u0001");
specialinvoke v.<org.apache.dubbo.remoting.RemotingException: void <init>(org.apache.dubbo.remoting.Channel,java.lang.String)>(v, v);
throw v;
label:
virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: boolean isConnected()>();
goto label;
label:
v := @caughtexception;
virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: boolean isConnected()>();
throw v;
label:
return;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
protected void doDisConnect() throws java.lang.Throwable
{
io.netty.channel.Channel v;
java.lang.Throwable v;
org.apache.dubbo.remoting.transport.netty.NettyClient v;
org.apache.dubbo.common.logger.Logger v;
java.lang.String v;
v := @this: org.apache.dubbo.remoting.transport.netty.NettyClient;
label:
v = v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.Channel channel>;
staticinvoke <org.apache.dubbo.remoting.transport.netty.NettyChannel: void removeChannelIfDisconnected(io.netty.channel.Channel)>(v);
label:
goto label;
label:
v := @caughtexception;
v = <org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.logger.Logger logger>;
v = virtualinvoke v.<java.lang.Throwable: java.lang.String getMessage()>();
interfaceinvoke v.<org.apache.dubbo.common.logger.Logger: void warn(java.lang.String)>(v);
label:
return;
catch java.lang.Throwable from label to label with label;
}
protected void doClose() throws java.lang.Throwable
{
org.apache.dubbo.remoting.transport.netty.NettyClient v;
v := @this: org.apache.dubbo.remoting.transport.netty.NettyClient;
return;
}
protected org.apache.dubbo.remoting.Channel getChannel()
{
io.netty.channel.Channel v;
org.apache.dubbo.common.URL v;
org.apache.dubbo.remoting.transport.netty.NettyClient v;
org.apache.dubbo.remoting.transport.netty.NettyChannel v;
v := @this: org.apache.dubbo.remoting.transport.netty.NettyClient;
v = v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.Channel channel>;
if v != null goto label;
return null;
label:
v = virtualinvoke v.<org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.URL getUrl()>();
v = staticinvoke <org.apache.dubbo.remoting.transport.netty.NettyChannel: org.apache.dubbo.remoting.transport.netty.NettyChannel getOrAddChannel(io.netty.channel.Channel,org.apache.dubbo.common.URL,org.apache.dubbo.remoting.ChannelHandler)>(v, v, v);
return v;
}
io.netty.channel.Channel getNettyChannel()
{
io.netty.channel.Channel v;
org.apache.dubbo.remoting.transport.netty.NettyClient v;
v := @this: org.apache.dubbo.remoting.transport.netty.NettyClient;
v = v.<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.Channel channel>;
return v;
}
public boolean canHandleIdle()
{
org.apache.dubbo.remoting.transport.netty.NettyClient v;
v := @this: org.apache.dubbo.remoting.transport.netty.NettyClient;
return 1;
}
static void <clinit>()
{
int v;
io.netty.channel.EventLoopGroup v;
org.apache.dubbo.common.logger.Logger v;
v = staticinvoke <org.apache.dubbo.common.logger.LoggerFactory: org.apache.dubbo.common.logger.Logger getLogger(java.lang.Class)>(class "Lorg/apache/dubbo/remoting/transport/netty4/NettyClient;");
<org.apache.dubbo.remoting.transport.netty.NettyClient: org.apache.dubbo.common.logger.Logger logger> = v;
v = <org.apache.dubbo.remoting.Constants: int DEFAULT_IO_THREADS>;
v = staticinvoke <org.apache.dubbo.remoting.transport.netty.NettyEventLoopFactory: io.netty.channel.EventLoopGroup eventLoopGroup(int,java.lang.String)>(v, "NettyClientWorker");
<org.apache.dubbo.remoting.transport.netty.NettyClient: io.netty.channel.EventLoopGroup NIO_EVENT_LOOP_GROUP> = v;
return;
}
}