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
true
if this iterator supports making at least one more attempt to communicate the remote call, andfalse
otherwise.This method invokes
hasNext
on 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
next
on the underlying iterator to obtain anOutboundRequest
. Then it writes the object identifier of theBasicObjectEndpoint
that 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
hasNext
would returnfalse
).Throws {@link IOException} if an
IOException
isthrown by the invocation ofnext
on the underlying iterator or by the subsequent I/O operations.Throws {@link SecurityException} if a
SecurityException
is thrown by the invocation ofnext
on the underlying iterator or by the subsequent I/O operations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|