public class SocketStreamFactory extends java.lang.Object implements StreamFactory
SocketStream
.Constructor and Description |
---|
SocketStreamFactory(SocketSettings settings,
SslSettings sslSettings)
Creates a new factory with the given settings for connecting to servers and the given SSL settings
|
SocketStreamFactory(SocketSettings settings,
SslSettings sslSettings,
javax.net.SocketFactory socketFactory)
Creates a new factory with the given settings for connecting to servers and a factory for creating connections.
|
Modifier and Type | Method and Description |
---|---|
Stream |
create(ServerAddress serverAddress)
Create a Stream to the given address
|
public SocketStreamFactory(SocketSettings settings, SslSettings sslSettings)
settings
- the SocketSettings for connecting to a MongoDB serversslSettings
- whether SSL is enabled.public SocketStreamFactory(SocketSettings settings, SslSettings sslSettings, javax.net.SocketFactory socketFactory)
settings
- the SocketSettings for connecting to a MongoDB serversslSettings
- the SSL for connecting to a MongoDB serversocketFactory
- a SocketFactory for creating connections to servers.public Stream create(ServerAddress serverAddress)
StreamFactory
create
in interface StreamFactory
serverAddress
- the address