public class LocalForwardingEntry extends Object
Constructor and Description |
---|
LocalForwardingEntry(SshdSocketAddress local,
InetSocketAddress bound) |
LocalForwardingEntry(SshdSocketAddress local,
SshdSocketAddress bound) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static LocalForwardingEntry |
findMatchingEntry(String host,
boolean anyLocalAddress,
int port,
Collection<? extends LocalForwardingEntry> entries) |
static LocalForwardingEntry |
findMatchingEntry(String host,
int port,
Collection<? extends LocalForwardingEntry> entries) |
SshdSocketAddress |
getBoundAddress() |
SshdSocketAddress |
getCombinedBoundAddress()
A combined address using the following logic:
If original requested local binding has a specific port and non-wildcard address then use the local binding
as-is
If original requested local binding has a specific address but no specific port, then combine its address
with the actual auto-allocated port at binding.
If original requested local binding has neither a specific address nor a specific port then use the effective
bound address.
|
SshdSocketAddress |
getLocalAddress() |
int |
hashCode() |
static SshdSocketAddress |
resolveCombinedBoundAddress(SshdSocketAddress local,
SshdSocketAddress bound) |
String |
toString() |
public LocalForwardingEntry(SshdSocketAddress local, InetSocketAddress bound)
public LocalForwardingEntry(SshdSocketAddress local, SshdSocketAddress bound)
public SshdSocketAddress getLocalAddress()
public SshdSocketAddress getBoundAddress()
public SshdSocketAddress getCombinedBoundAddress()
public static SshdSocketAddress resolveCombinedBoundAddress(SshdSocketAddress local, SshdSocketAddress bound)
public static LocalForwardingEntry findMatchingEntry(String host, int port, Collection<? extends LocalForwardingEntry> entries)
public static LocalForwardingEntry findMatchingEntry(String host, boolean anyLocalAddress, int port, Collection<? extends LocalForwardingEntry> entries)
host
- The host - ignored if null
/empty and not wildcard address match - i.e., no match
reportedanyLocalAddress
- Is host the wildcard address - in which case, we try an exact match first for the host,
and if that fails then only the port is matchedport
- The port - ignored if non-positive - i.e., no match reportedentries
- The Collection
of LocalForwardingEntry
to check - ignored if
null
/empty - i.e., no match reportednull
if no match foundCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.