final class com.mongodb.internal.connection.SocketStreamHelper
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.mongodb.internal.connection.SocketStreamHelper
super_class: java.lang.Object
{
static void initialize(java.net.Socket, java.net.InetSocketAddress, com.mongodb.connection.SocketSettings, com.mongodb.connection.SslSettings);
descriptor: (Ljava/net/Socket;Ljava/net/InetSocketAddress;Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;)V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=6, args_size=4
start local 0 // java.net.Socket socket
start local 1 // java.net.InetSocketAddress inetSocketAddress
start local 2 // com.mongodb.connection.SocketSettings settings
start local 3 // com.mongodb.connection.SslSettings sslSettings
0: .line 38
aload 0 /* socket */
iconst_1
invokevirtual java.net.Socket.setTcpNoDelay:(Z)V
1: .line 39
aload 0 /* socket */
aload 2 /* settings */
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.SocketSettings.getReadTimeout:(Ljava/util/concurrent/TimeUnit;)I
invokevirtual java.net.Socket.setSoTimeout:(I)V
2: .line 40
aload 0 /* socket */
aload 2 /* settings */
invokevirtual com.mongodb.connection.SocketSettings.isKeepAlive:()Z
invokevirtual java.net.Socket.setKeepAlive:(Z)V
3: .line 41
aload 2 /* settings */
invokevirtual com.mongodb.connection.SocketSettings.getReceiveBufferSize:()I
ifle 5
4: .line 42
aload 0 /* socket */
aload 2 /* settings */
invokevirtual com.mongodb.connection.SocketSettings.getReceiveBufferSize:()I
invokevirtual java.net.Socket.setReceiveBufferSize:(I)V
5: .line 44
StackMap locals:
StackMap stack:
aload 2 /* settings */
invokevirtual com.mongodb.connection.SocketSettings.getSendBufferSize:()I
ifle 7
6: .line 45
aload 0 /* socket */
aload 2 /* settings */
invokevirtual com.mongodb.connection.SocketSettings.getSendBufferSize:()I
invokevirtual java.net.Socket.setSendBufferSize:(I)V
7: .line 47
StackMap locals:
StackMap stack:
aload 3 /* sslSettings */
invokevirtual com.mongodb.connection.SslSettings.isEnabled:()Z
ifne 8
aload 0 /* socket */
instanceof javax.net.ssl.SSLSocket
ifeq 18
8: .line 48
StackMap locals:
StackMap stack:
aload 0 /* socket */
instanceof javax.net.ssl.SSLSocket
ifne 10
9: .line 49
new com.mongodb.MongoInternalException
dup
ldc "SSL is enabled but the socket is not an instance of javax.net.ssl.SSLSocket"
invokespecial com.mongodb.MongoInternalException.<init>:(Ljava/lang/String;)V
athrow
10: .line 51
StackMap locals:
StackMap stack:
aload 0 /* socket */
checkcast javax.net.ssl.SSLSocket
astore 4 /* sslSocket */
start local 4 // javax.net.ssl.SSLSocket sslSocket
11: .line 52
aload 4 /* sslSocket */
invokevirtual javax.net.ssl.SSLSocket.getSSLParameters:()Ljavax/net/ssl/SSLParameters;
astore 5 /* sslParameters */
start local 5 // javax.net.ssl.SSLParameters sslParameters
12: .line 53
aload 5 /* sslParameters */
ifnonnull 14
13: .line 54
new javax.net.ssl.SSLParameters
dup
invokespecial javax.net.ssl.SSLParameters.<init>:()V
astore 5 /* sslParameters */
14: .line 57
StackMap locals: javax.net.ssl.SSLSocket javax.net.ssl.SSLParameters
StackMap stack:
aload 1 /* inetSocketAddress */
invokevirtual java.net.InetSocketAddress.getHostName:()Ljava/lang/String;
aload 5 /* sslParameters */
invokestatic com.mongodb.internal.connection.SslHelper.enableSni:(Ljava/lang/String;Ljavax/net/ssl/SSLParameters;)V
15: .line 59
aload 3 /* sslSettings */
invokevirtual com.mongodb.connection.SslSettings.isInvalidHostNameAllowed:()Z
ifne 17
16: .line 60
aload 5 /* sslParameters */
invokestatic com.mongodb.internal.connection.SslHelper.enableHostNameVerification:(Ljavax/net/ssl/SSLParameters;)V
17: .line 62
StackMap locals:
StackMap stack:
aload 4 /* sslSocket */
aload 5 /* sslParameters */
invokevirtual javax.net.ssl.SSLSocket.setSSLParameters:(Ljavax/net/ssl/SSLParameters;)V
end local 5 // javax.net.ssl.SSLParameters sslParameters
end local 4 // javax.net.ssl.SSLSocket sslSocket
18: .line 64
StackMap locals:
StackMap stack:
aload 0 /* socket */
aload 1 /* inetSocketAddress */
aload 2 /* settings */
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.SocketSettings.getConnectTimeout:(Ljava/util/concurrent/TimeUnit;)I
invokevirtual java.net.Socket.connect:(Ljava/net/SocketAddress;I)V
19: .line 65
return
end local 3 // com.mongodb.connection.SslSettings sslSettings
end local 2 // com.mongodb.connection.SocketSettings settings
end local 1 // java.net.InetSocketAddress inetSocketAddress
end local 0 // java.net.Socket socket
LocalVariableTable:
Start End Slot Name Signature
0 20 0 socket Ljava/net/Socket;
0 20 1 inetSocketAddress Ljava/net/InetSocketAddress;
0 20 2 settings Lcom/mongodb/connection/SocketSettings;
0 20 3 sslSettings Lcom/mongodb/connection/SslSettings;
11 18 4 sslSocket Ljavax/net/ssl/SSLSocket;
12 18 5 sslParameters Ljavax/net/ssl/SSLParameters;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
socket final
inetSocketAddress final
settings final
sslSettings final
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 // com.mongodb.internal.connection.SocketStreamHelper this
0: .line 67
aload 0 /* this */
invokespecial java.lang.Object.<init>:()V
1: .line 68
return
end local 0 // com.mongodb.internal.connection.SocketStreamHelper this
LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/internal/connection/SocketStreamHelper;
}
SourceFile: "SocketStreamHelper.java"