OutboundRequestIterator
to use to send a new request for the specified handle to this connection manager's ConnectionEndpoint
. If the hasNext
method of the returned iterator returns true
, the next
method behaves as follows:
The connection endpoint's {@link ConnectionEndpoint#connect(OutboundRequestHandle,Collection,Collection) connect} method is invoked with any active connections thathave not reached their maximum number of in-progress requests, any idle connections, andhandle
. If that returnsnull
, the endpoint's {@link ConnectionEndpoint#connect(OutboundRequestHandle) connect}method is invoked withhandle
. In either case, if a new connection is returned, the Jini ERI multiplexing protocol is started on the connection (as the client). Finally, the {@link Connection#writeRequestData writeRequestData} method of the connection is invoked withhandle
and the request output stream of the {@link OutboundRequest} that is created for the request. If anyexception is thrown while obtaining a connection from the endpoint or writing the request data, that exception is thrown to the caller. TheOutboundRequest
returned bynext
will invoke the {@link Connection#readResponseData readResponseData} method of theconnection with the specified handle and the response input stream before any other data is read from the response input stream. The {@link OutboundRequest#populateContext populateContext} and {@link OutboundRequest#getUnfulfilledConstraints getUnfulfilledConstraints} methods of theOutboundRequest
are implemented by delegating to the corresponding method of the connection passinghandle
and the other arguments (if any).
The returned iterator might allow continued iteration if the connection used for the most recent request attempt was shut down gracefully by the server.
@param handle a handle to identify the request in laterinvocations on the connection endpoint and its connections
@return an OutboundRequestIterator
to use to senda new request for the specified handle to this connection manager's ConnectionEndpoint
@throws NullPointerException if handle
isnull
|
|