This method first invokes {@link Endpoint#newRequest newRequest} on this BasicObjectEndpoint'scontained Endpoint with the specified constraints to obtain an OutboundRequestIterator. It then wraps the obtained iterator in another OutboundRequestIterator and returns the wrapped iterator.
The methods of the returned OutboundRequestIterator behave as follows:
{@link OutboundRequestIterator#hasNext boolean hasNext()}:
Returns
trueif this iterator supports making at least one more attempt to communicate the remote call, andfalseotherwise.This method invokes
hasNexton the underlying iterator and returns the result.The security context in which this method is invoked may be used for subsequent verification of security permissions; see the {@link OutboundRequestIterator#next next} methodspecification for more details.
{@link OutboundRequestIterator#next OutboundRequest next()}:
@throws NullPointerException {@inheritDoc}Initiates an attempt to communicate the remote call to the referenced remote object.
This method invokes
nexton the underlying iterator to obtain anOutboundRequest. Then it writes the object identifier of theBasicObjectEndpointthat produced this iterator to the request's output stream by invoking {@link Uuid#write(OutputStream) Uuid.write(OutputStream)} with therequest output stream, and then it returns the request.Throws {@link NoSuchElementException} if this iterator doesnot support making another attempt to communicate the remote call (that is, if
hasNextwould returnfalse).Throws {@link IOException} if an
IOExceptionisthrown by the invocation ofnexton the underlying iterator or by the subsequent I/O operations.Throws {@link SecurityException} if a
SecurityExceptionis thrown by the invocation ofnexton the underlying iterator or by the subsequent I/O operations.
| |
| |
| |
| |
| |
| |
| |
| |
| |