Package com.mongodb
Class UnixServerAddress
- java.lang.Object
-
- com.mongodb.ServerAddress
-
- com.mongodb.UnixServerAddress
-
- All Implemented Interfaces:
Serializable
@Immutable public final class UnixServerAddress extends ServerAddress
Represents the location of a MongoD unix domain socket.Requires the 'jnr.unixsocket' library.
- Since:
- 3.7
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnixServerAddress(String path)
Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InetSocketAddress
getSocketAddress()
Gets the underlying socket addressSocketAddress
getUnixSocketAddress()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from class com.mongodb.ServerAddress
defaultHost, defaultPort, equals, getHost, getPort, getSocketAddresses, hashCode, sameHost
-
-
-
-
Constructor Detail
-
UnixServerAddress
public UnixServerAddress(String path)
Creates a new instance- Parameters:
path
- the path of the MongoD unix domain socket.
-
-
Method Detail
-
getSocketAddress
public InetSocketAddress getSocketAddress()
Description copied from class:ServerAddress
Gets the underlying socket address- Overrides:
getSocketAddress
in classServerAddress
- Returns:
- socket address
-
getUnixSocketAddress
public SocketAddress getUnixSocketAddress()
- Returns:
- the SocketAddress for the MongoD unix domain socket.
-
toString
public String toString()
- Overrides:
toString
in classServerAddress
-
-