public class SshdSocketAddress extends SocketAddress
A simple socket address holding the host name and port number. The reason
it does not extend InetSocketAddress is twofold:
The InetSocketAddress performs a DNS resolution on the
provided host name - which we don't want do use until we want to
create a connection using this address (thus the toInetSocketAddress()
call which executes this query
If empty host name is provided we replace it with the any address of 0.0.0.0
| Modifier and Type | Field and Description |
|---|---|
static SshdSocketAddress |
LOCALHOST_ADDRESS
A dummy placeholder that can be used instead of
nulls |
| Constructor and Description |
|---|
SshdSocketAddress(String hostName,
int port) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getHostName() |
int |
getPort() |
int |
hashCode() |
protected boolean |
isEquivalent(SshdSocketAddress that) |
InetSocketAddress |
toInetSocketAddress() |
String |
toString() |
public static final SshdSocketAddress LOCALHOST_ADDRESS
nullspublic SshdSocketAddress(String hostName, int port)
public String getHostName()
public int getPort()
public InetSocketAddress toInetSocketAddress()
protected boolean isEquivalent(SshdSocketAddress that)
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.