Package com.ngrok.definitions
Class TunnelSession
java.lang.Object
com.ngrok.definitions.TunnelSession
A class encapsulating the
TunnelSession
resource.-
Constructor Summary
ConstructorDescriptionTunnelSession
(String agentVersion, Ref credential, String id, String ip, String metadata, String os, String region, OffsetDateTime startedAt, String transport, URI uri) Creates a new instance ofTunnelSession
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
version of the ngrok agent that started this ngrok tunnel sessionreference to the tunnel credential or ssh credential used by the ngrok agent to start this tunnel sessiongetId()
unique tunnel session resource identifiergetIp()
source ip address of the tunnel sessionarbitrary user-defined data specified in the metadata property in the ngrok configuration file.getOs()
operating system of the host the ngrok agent is running onthe ngrok region identifier in which this tunnel session was startedtime when the tunnel session first connected to the ngrok serversthe transport protocol used to start the tunnel session.getUri()
URI to the API resource of the tunnel sessionint
hashCode()
toString()
-
Constructor Details
-
TunnelSession
public TunnelSession(String agentVersion, Ref credential, String id, String ip, String metadata, String os, String region, OffsetDateTime startedAt, String transport, URI uri) Creates a new instance ofTunnelSession
.- Parameters:
agentVersion
- version of the ngrok agent that started this ngrok tunnel sessioncredential
- reference to the tunnel credential or ssh credential used by the ngrok agent to start this tunnel sessionid
- unique tunnel session resource identifierip
- source ip address of the tunnel sessionmetadata
- arbitrary user-defined data specified in the metadata property in the ngrok configuration file. See the metadata configuration optionos
- operating system of the host the ngrok agent is running onregion
- the ngrok region identifier in which this tunnel session was startedstartedAt
- time when the tunnel session first connected to the ngrok serverstransport
- the transport protocol used to start the tunnel session. Eitherngrok/v2
orssh
uri
- URI to the API resource of the tunnel session
-
-
Method Details
-
getAgentVersion
version of the ngrok agent that started this ngrok tunnel session- Returns:
- the value of the property as a
String
-
getCredential
reference to the tunnel credential or ssh credential used by the ngrok agent to start this tunnel session- Returns:
- the value of the property as a
Ref
-
getId
unique tunnel session resource identifier- Returns:
- the value of the property as a
String
-
getIp
source ip address of the tunnel session- Returns:
- the value of the property as a
String
-
getMetadata
arbitrary user-defined data specified in the metadata property in the ngrok configuration file. See the metadata configuration option- Returns:
- the value of the property as a
String
-
getOs
operating system of the host the ngrok agent is running on- Returns:
- the value of the property as a
String
-
getRegion
the ngrok region identifier in which this tunnel session was started- Returns:
- the value of the property as a
String
-
getStartedAt
time when the tunnel session first connected to the ngrok servers- Returns:
- the value of the property as a
OffsetDateTime
-
getTransport
the transport protocol used to start the tunnel session. Eitherngrok/v2
orssh
- Returns:
- the value of the property as a
String
-
getUri
URI to the API resource of the tunnel session- Returns:
- the value of the property as a
URI
-
equals
-
hashCode
public int hashCode() -
toString
-