Search in sources :

Example 1 with TlsChannelStreamFactoryFactory

use of com.mongodb.connection.TlsChannelStreamFactoryFactory in project mongo-java-driver by mongodb.

the class MongoClients method createWithTlsChannel.

private static MongoClient createWithTlsChannel(final MongoClientSettings settings, @Nullable final MongoDriverInformation mongoDriverInformation) {
    TlsChannelStreamFactoryFactory streamFactoryFactory = new TlsChannelStreamFactoryFactory();
    StreamFactory streamFactory = streamFactoryFactory.create(settings.getSocketSettings(), settings.getSslSettings());
    StreamFactory heartbeatStreamFactory = streamFactoryFactory.create(settings.getHeartbeatSocketSettings(), settings.getSslSettings());
    return createMongoClient(settings, mongoDriverInformation, streamFactory, heartbeatStreamFactory, streamFactoryFactory);
}
Also used : StreamFactory(com.mongodb.connection.StreamFactory) TlsChannelStreamFactoryFactory(com.mongodb.connection.TlsChannelStreamFactoryFactory)

Aggregations

StreamFactory (com.mongodb.connection.StreamFactory)1 TlsChannelStreamFactoryFactory (com.mongodb.connection.TlsChannelStreamFactoryFactory)1