Represents a communication endpoint on the current (local) host to listen for and receive requests on.
A ListenEndpoint
instance contains the information necessary to listen for requests on the communication endpoint. For example, a TCP-based ListenEndpoint
implementation typically contains the TCP port to listen on. An implementation that supports authentication typically contains the {@link Subject} (if any)to use for server authentication.
The {@link #listen listen} method can be used to start alisten operation on the communication endpoint that it represents, during which requests received on the endpoint will be dispatched to a supplied {@link RequestDispatcher}.
ListenEndpoint
instances make up the discrete communication endpoints represented by a ServerEndpoint
, and they are passed to a {@link ServerEndpoint.ListenContext ListenContext} as part of a {@link ServerEndpoint#enumerateListenEndpoints ServerEndpoint.enumerateListenEndpoints} invocation.
An instance of this interface should implement {@link Object#equals Object.equals} to return true
if andonly if the argument is equivalent to the instance in trust, content, and function. The equals
method should not invoke comparison methods (such as equals
) on any pluggable component without first verifying that the component's implementation is at least as trusted as the implementation of the corresponding component in the equals
argument (such as by verifying that the corresponding component objects have the same actual class). If any such verification fails, the equals
method should return false
without invoking a comparison method on the component. Furthermore, these guidelines should be recursively obeyed by the comparison methods of each such component for its subcomponents. To avoid opening a security hole, implementations should only compare object identity (==
) of Subject
instances, rather than comparing their contents.
The equivalence relation of a ListenEndpoint
should not be a function of any state in an associated ServerEndpoint
that only applies to the ServerEndpoint
's template for producing Endpoint
instances.