Skip to content

Commit 16a1558

Browse files
committed
Deprecate MongoClientOptions#socketFactory property
JAVA-3044
1 parent 484d6ca commit 16a1558

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

driver-legacy/src/main/com/mongodb/MongoClientOptions.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,9 @@ public boolean isAlwaysUseMBeans() {
693693
* <p>Default is SocketFactory.getDefault()</p>
694694
*
695695
* @return the socket factory
696+
* @deprecated Prefer {@link #isSslEnabled()} and {@link #getSslContext()}
696697
*/
698+
@Deprecated
697699
public SocketFactory getSocketFactory() {
698700
if (socketFactory != null) {
699701
return socketFactory;
@@ -1437,7 +1439,9 @@ public Builder addServerMonitorListener(final ServerMonitorListener serverMonito
14371439
* @param socketFactory the socket factory
14381440
* @return {@code this}
14391441
* @see MongoClientOptions#getSocketFactory()
1442+
* @deprecated Prefer {@link #sslEnabled(boolean)} and {@link #sslContext(SSLContext)}
14401443
*/
1444+
@Deprecated
14411445
public Builder socketFactory(final SocketFactory socketFactory) {
14421446
this.socketFactory = socketFactory;
14431447
return this;

0 commit comments

Comments
 (0)