Package com.ngrok
Class MetadataBuilder<T extends MetadataBuilder>
- java.lang.Object
-
- com.ngrok.MetadataBuilder<T>
-
- Type Parameters:
T- the concrete builder impl to return to satisfy the builder pattern
- Direct Known Subclasses:
EdgeBuilder,EndpointBuilder
public abstract class MetadataBuilder<T extends MetadataBuilder> extends Object
An abstract builder sharing common attributes of all listener builders.
-
-
Constructor Summary
Constructors Constructor Description MetadataBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TforwardsTo(String forwardsTo)Sets the forwarding information for this endpoint.Optional<String>getForwardsTo()Returns the forwarding information for this endpoint.Optional<String>getMetadata()Returns the metadata for this endpoint.Tmetadata(String metadata)Sets the metadata for this endpoint.
-
-
-
Method Detail
-
metadata
public T metadata(String metadata)
Sets the metadata for this endpoint.- Parameters:
metadata- the metadata- Returns:
- An instance the builder represented by type T
-
forwardsTo
public T forwardsTo(String forwardsTo)
Sets the forwarding information for this endpoint. If you need to automatically forward connections, you can useForwarder, either through usingForwarder.Builderor directly calling methods onSessionsuch asSession.forwardHttp(HttpBuilder, URL). NOTE: Using theForwarderwill override what is set here with the actual URL you're forwarding to.- Parameters:
forwardsTo- the forwarding information- Returns:
- An instance the builder represented by type T
-
getMetadata
public Optional<String> getMetadata()
Returns the metadata for this endpoint.- Returns:
- the metadata
-
-