Class EndpointReference<T extends ResourceWithEndpoints<?>>

java.lang.Object
com.azure.runtime.host.resources.references.EndpointReference<T>
All Implemented Interfaces:
ManifestExpressionProvider, ValueProvider, ValueWithReferences

public class EndpointReference<T extends ResourceWithEndpoints<?>> extends Object implements ValueProvider, ValueWithReferences, ManifestExpressionProvider
An EndpointReference is a core type used for keeping track of endpoint details in expressions. Simple literal values cannot be used because endpoints are not known until containers are launched.
  • Constructor Details Link icon

    • EndpointReference Link icon

      public EndpointReference(T owner, EndpointAnnotation endpointAnnotation)
      Creates a new instance of EndpointReference with the specified endpoint name.
      Parameters:
      owner - The resource with endpoints that owns the endpoint reference.
      endpointAnnotation - The endpoint annotation.
    • EndpointReference Link icon

      public EndpointReference(T owner, String endpointName)
      Creates a new instance of EndpointReference with the specified endpoint name.
      Parameters:
      owner - The resource with endpoints that owns the endpoint reference.
      endpointName - The name of the endpoint.
  • Method Details Link icon

    • getValue Link icon

      public String getValue()
      Specified by:
      getValue in interface ValueProvider
    • getValueExpression Link icon

      public String getValueExpression()
      Description copied from interface: ManifestExpressionProvider
      Gets the expression that represents a value in manifest.
      Specified by:
      getValueExpression in interface ManifestExpressionProvider
      Returns:
      The expression that represents a value in manifest.
    • getReferences Link icon

      public List<Object> getReferences()
      Description copied from interface: ValueWithReferences
      A read-only list of the referenced objects of the value.
      Specified by:
      getReferences in interface ValueWithReferences
      Returns:
      A read-only list of the referenced objects.
    • getContainerHost Link icon

      public String getContainerHost()
      Gets the container host for this endpoint.
      Returns:
      The container host.
    • getEndpointName Link icon

      public String getEndpointName()
      Gets the name of the endpoint associated with this reference.
      Returns:
      The endpoint name.
    • isExists Link icon

      public boolean isExists()
      Gets a value indicating whether the endpoint exists.
      Returns:
      true if the endpoint exists, false otherwise.
    • getHost Link icon

      public String getHost()
      Gets the host for this endpoint.
      Returns:
      The host.
    • isAllocated Link icon

      public boolean isAllocated()
      Checks if the endpoint is allocated.
      Returns:
      true if the endpoint is allocated, false otherwise.
    • getPort Link icon

      public int getPort()
      Gets the port for this endpoint.
      Returns:
      The port.
    • getResource Link icon

      public T getResource()
      Gets the resource owner of the endpoint reference.
      Returns:
      The resource owner.
    • getScheme Link icon

      public Scheme getScheme()
      Gets the scheme for this endpoint.
      Returns:
      The scheme.
    • getTargetPort Link icon

      public Integer getTargetPort()
      Gets the target port for this endpoint. Returns null if the port is dynamically allocated.
      Returns:
      The target port, or null if dynamically allocated.
    • getUrl Link icon

      public String getUrl()
      Gets the URL for this endpoint.
      Returns:
      The URL.