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 InetSocketAddressgetSocketAddress()Gets the underlying socket addressSocketAddressgetUnixSocketAddress()StringtoString()- 
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:ServerAddressGets the underlying socket address- Overrides:
 getSocketAddressin classServerAddress- Returns:
 - socket address
 
 
- 
getUnixSocketAddress
public SocketAddress getUnixSocketAddress()
- Returns:
 - the SocketAddress for the MongoD unix domain socket.
 
 
- 
toString
public String toString()
- Overrides:
 toStringin classServerAddress
 
 - 
 
 -