Class RemotePortForwarder.Forward
- java.lang.Object
-
- net.schmizz.sshj.connection.channel.forwarded.RemotePortForwarder.Forward
-
- Enclosing class:
- RemotePortForwarder
public static final class RemotePortForwarder.Forward extends java.lang.ObjectRepresents a particular forwarding. From RFC 4254, s. 7.1The 'address to bind' and 'port number to bind' specify the IP address (or domain name) and port on which connections for forwarding are to be accepted. Some strings used for 'address to bind' have special-case semantics. o "" means that connections are to be accepted on all protocol families supported by the SSH implementation. o "0.0.0.0" means to listen on all IPv4 addresses. o "::" means to listen on all IPv6 addresses. o "localhost" means to listen on all protocol families supported by the SSH implementation on loopback addresses only ([RFC3330] and [RFC3513]). o "127.0.0.1" and "::1" indicate listening on the loopback interfaces for IPv4 and IPv6, respectively.
-
-
Constructor Summary
Constructors Constructor Description Forward(int port)Creates this forward with address as""and specifiedport.Forward(java.lang.String address)Creates this forward with specifiedaddressand port as0.Forward(java.lang.String address, int port)Creates this forward with specifiedaddressandportnumber.
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetAddress()intgetPort()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Forward
public Forward(int port)
Creates this forward with address as""and specifiedport.- Parameters:
port-
-
Forward
public Forward(java.lang.String address)
Creates this forward with specifiedaddressand port as0.- Parameters:
address-
-
Forward
public Forward(java.lang.String address, int port)Creates this forward with specifiedaddressandportnumber.- Parameters:
address- address to bindport- port number
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getAddress
public java.lang.String getAddress()
- Returns:
- the address represented by this forward.
-
getPort
public int getPort()
- Returns:
- the port represented by this forward.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-