Module com.azure.runtime.host
Class EndpointAnnotation
java.lang.Object
com.azure.runtime.host.resources.annotations.EndpointAnnotation
- All Implemented Interfaces:
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
getPort()
boolean
boolean
void
setAllocatedEndpoint
(AllocatedEndpoint allocatedEndpoint) void
setExternal
(boolean external) void
void
setProxied
(boolean proxied) void
setTargetPort
(Integer targetPort) void
setTransport
(Transport transport) toString()
-
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 ofEndpointAnnotation
.- 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
-
getProtocol
-
getPort
-
setPort
-
getTargetPort
-
setTargetPort
-
getUriScheme
-
getTransport
-
setTransport
-
isExternal
public boolean isExternal() -
setExternal
public void setExternal(boolean external) -
isProxied
public boolean isProxied() -
setProxied
public void setProxied(boolean proxied) -
getAllocatedEndpoint
-
setAllocatedEndpoint
-
toString
-