Class EndpointAnnotation

java.lang.Object
com.azure.runtime.host.resources.annotations.EndpointAnnotation
All Implemented Interfaces:
ResourceAnnotation

public class EndpointAnnotation extends Object implements ResourceAnnotation
Represents an endpoint annotation that describes how a service should be bound to a network.

This class is used to specify the network protocol, port, URI scheme, transport, and other details for a service.

  • Constructor Details

    • EndpointAnnotation

      public EndpointAnnotation(Protocol protocol, Scheme uriScheme, Transport transport, String name, Integer port, Integer targetPort, boolean isExternal, boolean isProxied)
      Initializes a new instance of EndpointAnnotation.
      Parameters:
      protocol - Network protocol: TCP or UDP are supported today, others possibly in future.
      uriScheme - If a service is URI-addressable, this is the URI scheme to use for constructing service URI.
      transport - Transport that is being used (e.g., http, http2, http3 etc.).
      name - Name of the service.
      port - Desired port for the service.
      targetPort - This is the port the resource is listening on. If the endpoint is used for the container, it is the container port.
      isExternal - Indicates that this endpoint should be exposed externally at publish time.
      isProxied - Specifies if the endpoint will be proxied. Defaults to true.
  • Method Details

    • getName

      public String getName()
    • getProtocol

      public Protocol getProtocol()
    • getPort

      public Integer getPort()
    • setPort

      public void setPort(Integer port)
    • getTargetPort

      public Integer getTargetPort()
    • setTargetPort

      public void setTargetPort(Integer targetPort)
    • getUriScheme

      public Scheme getUriScheme()
    • getTransport

      public Transport getTransport()
    • setTransport

      public void setTransport(Transport transport)
    • isExternal

      public boolean isExternal()
    • setExternal

      public void setExternal(boolean external)
    • isProxied

      public boolean isProxied()
    • setProxied

      public void setProxied(boolean proxied)
    • getAllocatedEndpoint

      public AllocatedEndpoint getAllocatedEndpoint()
    • setAllocatedEndpoint

      public void setAllocatedEndpoint(AllocatedEndpoint allocatedEndpoint)
    • toString

      public String toString()
      Overrides:
      toString in class Object