Package com.ngrok.definitions
Class Tunnel
java.lang.Object
com.ngrok.definitions.Tunnel
A class encapsulating the
Tunnel
resource.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
tunnel group backends served by this backend tunnelthe ephemeral endpoint this tunnel is associated with, if this is an agent-initiated tunnelupstream address the ngrok agent forwards traffic over this tunnel to.getId()
unique tunnel resource identifierthe labels the tunnel group backends will match against, if this is a backend tunneluser-supplied metadata for the tunnel defined in the ngrok configuration file.getProto()
tunnel protocol for ephemeral tunnels.URL of the ephemeral 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 startedint
hashCode()
toString()
-
Constructor Details
-
Tunnel
public Tunnel(String id, URI publicUrl, OffsetDateTime startedAt, String metadata, String proto, String region, Ref tunnelSession, Optional<Ref> endpoint, Map<String, String> labels, Optional<List<Ref>> backends, String forwardsTo) Creates a new instance ofTunnel
.- Parameters:
id
- unique tunnel resource identifierpublicUrl
- URL of the ephemeral 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 for ephemeral tunnels. one ofhttp
,https
,tcp
ortls
region
- identifier of tune region where the tunnel is runningtunnelSession
- reference object pointing to the tunnel session on which this tunnel was startedendpoint
- the ephemeral endpoint this tunnel is associated with, if this is an agent-initiated tunnellabels
- the labels the tunnel group backends will match against, if this is a backend tunnelbackends
- tunnel group backends served by this backend tunnelforwardsTo
- upstream address the ngrok agent forwards traffic over this tunnel to. this may be expressed as a URL or a network address.
-
-
Method Details
-
getId
unique tunnel resource identifier- Returns:
- the value of the property as a
String
-
getPublicUrl
URL of the ephemeral 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 for ephemeral tunnels. one ofhttp
,https
,tcp
ortls
- 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
-
getEndpoint
the ephemeral endpoint this tunnel is associated with, if this is an agent-initiated tunnel -
getLabels
the labels the tunnel group backends will match against, if this is a backend tunnel -
getBackends
tunnel group backends served by this backend tunnel -
getForwardsTo
upstream address the ngrok agent forwards traffic over this tunnel to. this may be expressed as a URL or a network address.- Returns:
- the value of the property as a
String
-
equals
-
hashCode
public int hashCode() -
toString
-