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 Link icon

    • EndpointAnnotation Link icon

      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 Link icon

    • getName Link icon

      public String getName()
    • getProtocol Link icon

      public Protocol getProtocol()
    • getPort Link icon

      public Integer getPort()
    • setPort Link icon

      public void setPort(Integer port)
    • getTargetPort Link icon

      public Integer getTargetPort()
    • setTargetPort Link icon

      public void setTargetPort(Integer targetPort)
    • getUriScheme Link icon

      public Scheme getUriScheme()
    • getTransport Link icon

      public Transport getTransport()
    • setTransport Link icon

      public void setTransport(Transport transport)
    • isExternal Link icon

      public boolean isExternal()
    • setExternal Link icon

      public void setExternal(boolean external)
    • isProxied Link icon

      public boolean isProxied()
    • setProxied Link icon

      public void setProxied(boolean proxied)
    • getAllocatedEndpoint Link icon

      public AllocatedEndpoint getAllocatedEndpoint()
    • setAllocatedEndpoint Link icon

      public void setAllocatedEndpoint(AllocatedEndpoint allocatedEndpoint)
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object