public interface Endpoint
An Endpoint
instance contains the information
necessary to send requests to the remote endpoint. For example, a
TCP-based Endpoint
implementation typically contains
the remote host address and TCP port to connect to.
The newRequest
method can be used to send a
request to the remote endpoint that this object represents.
An instance of this interface should be serializable and should
implement Object.equals
to return
true
if and only if the argument is equivalent to the
instance in trust, content, and function. That is, the
equals
method should be a sufficient substitute for
TrustEquivalence.checkTrustEquivalence
. But unlike
checkTrustEquivalence
, the equals
method
cannot assume that the implementations of any of the invoked
instance's pluggable component objects are trusted (whether
pluggable through public APIs or deserialization). Therefore, the
equals
method should not invoke comparison methods
(such as equals
) on any such 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.
If an Endpoint
is an instance of TrustEquivalence
, then its equals
method must obey
the above guidelines and its checkTrustEquivalence
method must not return true
if its equals
method would not return true
for the same argument.
All aspects of the underlying communication mechanism that are not specified here are defined by the particular implementation of this interface.
ServerEndpoint
Modifier and Type | Method and Description |
---|---|
OutboundRequestIterator |
newRequest(InvocationConstraints constraints)
Returns an
OutboundRequestIterator to use to send
a new request to this remote endpoint using the specified
constraints. |
OutboundRequestIterator newRequest(InvocationConstraints constraints)
OutboundRequestIterator
to use to send
a new request to this remote endpoint using the specified
constraints.
The constraints must be the complete, absolute constraints for the request.
constraints
- the complete, absolute constraintsOutboundRequestIterator
to use to send
a new request to this remote endpointNullPointerException
- if constraints
is
null
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.