Package com.mongodb
Class MongoSocketException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.mongodb.MongoException
com.mongodb.MongoSocketException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MongoSocketClosedException
,MongoSocketOpenException
,MongoSocketReadException
,MongoSocketReadTimeoutException
,MongoSocketWriteException
Subclass of
MongoException
representing a network-related exception- Since:
- 2.12
-
Field Summary
Fields inherited from class com.mongodb.MongoException
TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL
-
Constructor Summary
ConstructorDescriptionMongoSocketException
(String message, ServerAddress serverAddress) Construct a new instance.MongoSocketException
(String msg, ServerAddress serverAddress, Throwable e) -
Method Summary
Modifier and TypeMethodDescriptionGets the server address for this exception.Methods inherited from class com.mongodb.MongoException
addLabel, addLabels, addLabels, fromThrowable, fromThrowableNonNull, getCode, getErrorLabels, hasErrorLabel, removeLabel
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MongoSocketException
- Parameters:
serverAddress
- the addressmsg
- the messagee
- the cause
-
MongoSocketException
Construct a new instance.- Parameters:
message
- the messageserverAddress
- the address
-
-
Method Details
-
getServerAddress
Gets the server address for this exception.- Returns:
- the address
-