Package com.ngrok.definitions
Class Tunnel
java.lang.Object
com.ngrok.definitions.Tunnel
A class encapsulating the
Tunnel resource.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetId()unique tunnel resource identifieruser-supplied metadata for the tunnel defined in the ngrok configuration file.getProto()tunnel protocol.URL of the tunnel's public endpointidentifier of tune region where the tunnel is runningtimestamp when the tunnel was initiated in RFC 3339 formatreference object pointing to the tunnel session on which this tunnel was startedinthashCode()toString()
-
Constructor Details
-
Tunnel
public Tunnel(String id, URI publicUrl, OffsetDateTime startedAt, String metadata, String proto, String region, Ref tunnelSession)Creates a new instance ofTunnel.- Parameters:
id- unique tunnel resource identifierpublicUrl- URL of the tunnel's public endpointstartedAt- timestamp when the tunnel was initiated in RFC 3339 formatmetadata- user-supplied metadata for the tunnel defined in the ngrok configuration file. See the tunnel metadata configuration option In API version 0, this value was instead pulled from the top-level metadata configuration option.proto- tunnel protocol. one ofhttp,https,tcportlsregion- identifier of tune region where the tunnel is runningtunnelSession- reference object pointing to the tunnel session on which this tunnel was started
-
-
Method Details
-
getId
unique tunnel resource identifier- Returns:
- the value of the property as a
String
-
getPublicUrl
URL of the tunnel's public endpoint- Returns:
- the value of the property as a
URI
-
getStartedAt
timestamp when the tunnel was initiated in RFC 3339 format- Returns:
- the value of the property as a
OffsetDateTime
-
getMetadata
user-supplied metadata for the tunnel defined in the ngrok configuration file. See the tunnel metadata configuration option In API version 0, this value was instead pulled from the top-level metadata configuration option.- Returns:
- the value of the property as a
String
-
getProto
tunnel protocol. one ofhttp,https,tcportls- Returns:
- the value of the property as a
String
-
getRegion
identifier of tune region where the tunnel is running- Returns:
- the value of the property as a
String
-
getTunnelSession
reference object pointing to the tunnel session on which this tunnel was started- Returns:
- the value of the property as a
Ref
-
equals
-
hashCode
public int hashCode() -
toString
-