Package org.apache.sshd.common.forward
Class LocalForwardingEntry
- java.lang.Object
-
- java.net.SocketAddress
-
- org.apache.sshd.common.util.net.SshdSocketAddress
-
- org.apache.sshd.common.forward.LocalForwardingEntry
-
- All Implemented Interfaces:
Serializable
public class LocalForwardingEntry extends SshdSocketAddress
- Author:
- Apache MINA SSHD Project
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.net.SshdSocketAddress
BROADCAST_ADDRESS, BY_HOST_ADDRESS, BY_HOST_AND_PORT, CARRIER_GRADE_NAT_PREFIX, IPV4_ANYADDR, IPV6_LONG_ANY_ADDRESS, IPV6_LONG_LOCALHOST, IPV6_MAX_HEX_DIGITS_PER_GROUP, IPV6_MAX_HEX_GROUPS, IPV6_SHORT_ANY_ADDRESS, IPV6_SHORT_LOCALHOST, LOCALHOST_ADDRESS, LOCALHOST_IPV4, LOCALHOST_NAME, PRIVATE_CLASS_A_PREFIX, PRIVATE_CLASS_B_PREFIX, PRIVATE_CLASS_C_PREFIX, WELL_KNOWN_IPV4_ADDRESSES, WELL_KNOWN_IPV6_ADDRESSES
-
-
Constructor Summary
Constructors Constructor Description LocalForwardingEntry(String hostName, String alias, int port)
LocalForwardingEntry(SshdSocketAddress local, InetSocketAddress bound)
LocalForwardingEntry(SshdSocketAddress local, SshdSocketAddress bound)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static LocalForwardingEntry
findMatchingEntry(String host, int port, Collection<? extends LocalForwardingEntry> entries)
String
getAlias()
int
hashCode()
protected boolean
isEquivalent(SshdSocketAddress that)
String
toString()
-
Methods inherited from class org.apache.sshd.common.util.net.SshdSocketAddress
getExternalNetwork4Addresses, getFirstExternalNetwork4Address, getHostName, getPort, isCarrierGradeNatIPv4Address, isIPv4Address, isIPv6Address, isLoopback, isLoopback, isPrivateIPv4Address, isValidHostAddress, isValidIPv4AddressComponent, toAddressPort, toAddressString, toAddressString, toInetSocketAddress, toInetSocketAddress, toSshdSocketAddress
-
-
-
-
Constructor Detail
-
LocalForwardingEntry
public LocalForwardingEntry(SshdSocketAddress local, InetSocketAddress bound)
-
LocalForwardingEntry
public LocalForwardingEntry(SshdSocketAddress local, SshdSocketAddress bound)
-
-
Method Detail
-
getAlias
public String getAlias()
-
isEquivalent
protected boolean isEquivalent(SshdSocketAddress that)
- Overrides:
isEquivalent
in classSshdSocketAddress
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classSshdSocketAddress
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classSshdSocketAddress
-
toString
public String toString()
- Overrides:
toString
in classSshdSocketAddress
-
findMatchingEntry
public static LocalForwardingEntry findMatchingEntry(String host, int port, Collection<? extends LocalForwardingEntry> entries)
- Parameters:
host
- The host - ignored ifnull
/empty - i.e., no match reportedport
- The port - ignored if non-positive - i.e., no match reportedentries
- TheCollection
ofLocalForwardingEntry
to check - ignored ifnull
/empty - i.e., no match reported- Returns:
- The first entry whose host or alias matches the host name - case
insensitive and has a matching port -
null
if no match found
-
-