public class com.mongodb.connection.SocketStreamFactory implements com.mongodb.connection.StreamFactory
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.mongodb.connection.SocketStreamFactory
super_class: java.lang.Object
{
private final com.mongodb.connection.SocketSettings settings;
descriptor: Lcom/mongodb/connection/SocketSettings;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.connection.SslSettings sslSettings;
descriptor: Lcom/mongodb/connection/SslSettings;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final javax.net.SocketFactory socketFactory;
descriptor: Ljavax/net/SocketFactory;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.connection.BufferProvider bufferProvider;
descriptor: Lcom/mongodb/connection/BufferProvider;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>(com.mongodb.connection.SocketSettings, com.mongodb.connection.SslSettings);
descriptor: (Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
aconst_null
invokespecial com.mongodb.connection.SocketStreamFactory.<init>:(Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;Ljavax/net/SocketFactory;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/connection/SocketStreamFactory;
0 2 1 settings Lcom/mongodb/connection/SocketSettings;
0 2 2 sslSettings Lcom/mongodb/connection/SslSettings;
MethodParameters:
Name Flags
settings final
sslSettings final
public void <init>(com.mongodb.connection.SocketSettings, com.mongodb.connection.SslSettings, javax.net.SocketFactory);
descriptor: (Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;Ljavax/net/SocketFactory;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new com.mongodb.internal.connection.PowerOfTwoBufferPool
dup
invokespecial com.mongodb.internal.connection.PowerOfTwoBufferPool.<init>:()V
putfield com.mongodb.connection.SocketStreamFactory.bufferProvider:Lcom/mongodb/connection/BufferProvider;
2: aload 0
ldc "settings"
aload 1
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.connection.SocketSettings
putfield com.mongodb.connection.SocketStreamFactory.settings:Lcom/mongodb/connection/SocketSettings;
3: aload 0
ldc "sslSettings"
aload 2
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.connection.SslSettings
putfield com.mongodb.connection.SocketStreamFactory.sslSettings:Lcom/mongodb/connection/SslSettings;
4: aload 0
aload 3
putfield com.mongodb.connection.SocketStreamFactory.socketFactory:Ljavax/net/SocketFactory;
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/connection/SocketStreamFactory;
0 6 1 settings Lcom/mongodb/connection/SocketSettings;
0 6 2 sslSettings Lcom/mongodb/connection/SslSettings;
0 6 3 socketFactory Ljavax/net/SocketFactory;
MethodParameters:
Name Flags
settings final
sslSettings final
socketFactory final
public com.mongodb.connection.Stream create(com.mongodb.ServerAddress);
descriptor: (Lcom/mongodb/ServerAddress;)Lcom/mongodb/connection/Stream;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=3, args_size=2
start local 0 start local 1 0: aload 1
instanceof com.mongodb.UnixServerAddress
ifeq 5
1: aload 0
getfield com.mongodb.connection.SocketStreamFactory.sslSettings:Lcom/mongodb/connection/SslSettings;
invokevirtual com.mongodb.connection.SslSettings.isEnabled:()Z
ifeq 3
2: new com.mongodb.MongoClientException
dup
ldc "Socket based connections do not support ssl"
invokespecial com.mongodb.MongoClientException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
new com.mongodb.internal.connection.UnixSocketChannelStream
dup
aload 1
checkcast com.mongodb.UnixServerAddress
aload 0
getfield com.mongodb.connection.SocketStreamFactory.settings:Lcom/mongodb/connection/SocketSettings;
aload 0
getfield com.mongodb.connection.SocketStreamFactory.sslSettings:Lcom/mongodb/connection/SslSettings;
aload 0
getfield com.mongodb.connection.SocketStreamFactory.bufferProvider:Lcom/mongodb/connection/BufferProvider;
invokespecial com.mongodb.internal.connection.UnixSocketChannelStream.<init>:(Lcom/mongodb/UnixServerAddress;Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;Lcom/mongodb/connection/BufferProvider;)V
astore 2
start local 2 4: goto 12
end local 2 5: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.connection.SocketStreamFactory.socketFactory:Ljavax/net/SocketFactory;
ifnull 8
6: new com.mongodb.internal.connection.SocketStream
dup
aload 1
aload 0
getfield com.mongodb.connection.SocketStreamFactory.settings:Lcom/mongodb/connection/SocketSettings;
aload 0
getfield com.mongodb.connection.SocketStreamFactory.sslSettings:Lcom/mongodb/connection/SslSettings;
aload 0
getfield com.mongodb.connection.SocketStreamFactory.socketFactory:Ljavax/net/SocketFactory;
aload 0
getfield com.mongodb.connection.SocketStreamFactory.bufferProvider:Lcom/mongodb/connection/BufferProvider;
invokespecial com.mongodb.internal.connection.SocketStream.<init>:(Lcom/mongodb/ServerAddress;Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;Ljavax/net/SocketFactory;Lcom/mongodb/connection/BufferProvider;)V
astore 2
start local 2 7: goto 12
end local 2 StackMap locals:
StackMap stack:
8: aload 0
getfield com.mongodb.connection.SocketStreamFactory.sslSettings:Lcom/mongodb/connection/SslSettings;
invokevirtual com.mongodb.connection.SslSettings.isEnabled:()Z
ifeq 11
9: new com.mongodb.internal.connection.SocketStream
dup
aload 1
aload 0
getfield com.mongodb.connection.SocketStreamFactory.settings:Lcom/mongodb/connection/SocketSettings;
aload 0
getfield com.mongodb.connection.SocketStreamFactory.sslSettings:Lcom/mongodb/connection/SslSettings;
aload 0
invokevirtual com.mongodb.connection.SocketStreamFactory.getSslContext:()Ljavax/net/ssl/SSLContext;
invokevirtual javax.net.ssl.SSLContext.getSocketFactory:()Ljavax/net/ssl/SSLSocketFactory;
aload 0
getfield com.mongodb.connection.SocketStreamFactory.bufferProvider:Lcom/mongodb/connection/BufferProvider;
invokespecial com.mongodb.internal.connection.SocketStream.<init>:(Lcom/mongodb/ServerAddress;Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;Ljavax/net/SocketFactory;Lcom/mongodb/connection/BufferProvider;)V
astore 2
start local 2 10: goto 12
end local 2 11: StackMap locals:
StackMap stack:
new com.mongodb.internal.connection.SocketStream
dup
aload 1
aload 0
getfield com.mongodb.connection.SocketStreamFactory.settings:Lcom/mongodb/connection/SocketSettings;
aload 0
getfield com.mongodb.connection.SocketStreamFactory.sslSettings:Lcom/mongodb/connection/SslSettings;
invokestatic javax.net.SocketFactory.getDefault:()Ljavax/net/SocketFactory;
aload 0
getfield com.mongodb.connection.SocketStreamFactory.bufferProvider:Lcom/mongodb/connection/BufferProvider;
invokespecial com.mongodb.internal.connection.SocketStream.<init>:(Lcom/mongodb/ServerAddress;Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;Ljavax/net/SocketFactory;Lcom/mongodb/connection/BufferProvider;)V
astore 2
start local 2 12: StackMap locals: com.mongodb.connection.Stream
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lcom/mongodb/connection/SocketStreamFactory;
0 13 1 serverAddress Lcom/mongodb/ServerAddress;
4 5 2 stream Lcom/mongodb/connection/Stream;
7 8 2 stream Lcom/mongodb/connection/Stream;
10 11 2 stream Lcom/mongodb/connection/Stream;
12 13 2 stream Lcom/mongodb/connection/Stream;
MethodParameters:
Name Flags
serverAddress final
private javax.net.ssl.SSLContext getSslContext();
descriptor: ()Ljavax/net/ssl/SSLContext;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield com.mongodb.connection.SocketStreamFactory.sslSettings:Lcom/mongodb/connection/SslSettings;
invokevirtual com.mongodb.connection.SslSettings.getContext:()Ljavax/net/ssl/SSLContext;
ifnonnull 1
invokestatic javax.net.ssl.SSLContext.getDefault:()Ljavax/net/ssl/SSLContext;
goto 2
StackMap locals:
StackMap stack:
1: aload 0
getfield com.mongodb.connection.SocketStreamFactory.sslSettings:Lcom/mongodb/connection/SslSettings;
invokevirtual com.mongodb.connection.SslSettings.getContext:()Ljavax/net/ssl/SSLContext;
StackMap locals:
StackMap stack: javax.net.ssl.SSLContext
2: areturn
3: StackMap locals:
StackMap stack: java.security.NoSuchAlgorithmException
astore 1
start local 1 4: new com.mongodb.MongoClientException
dup
ldc "Unable to create default SSLContext"
aload 1
invokespecial com.mongodb.MongoClientException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/connection/SocketStreamFactory;
4 5 1 e Ljava/security/NoSuchAlgorithmException;
Exception table:
from to target type
0 2 3 Class java.security.NoSuchAlgorithmException
}
SourceFile: "SocketStreamFactory.java"