public interface IServiceConnectionResponse extends ISignalReadStream<io.apiman.gateway.engine.beans.ServiceResponse>
ServiceResponse object
as well as a stream of data (the response payload/body).
One of these is passed asynchronously to apiman *after* the service connection is
established, all request body data is written, and the back-end service responds
successfully.
The ServiceResponse MUST be made available via the getHead() method and
should be available immediately.
The response payload/body is delivered asynchronously. apiman will add asynchronous
body and end handlers to this connection response and then call transmit(). Once
transmit() is called, that is the signal to the implementation of this interface
to go ahead and start sending the data to the body handler. Once all data is written,
an implementation MUST call the end handler.
If an error occurs during data transmission, apiman WILL call the abort() method
of this interface, providing an opportunity for implementations to close down the
connection and free up any resources.
There is no close() method, so an implementation is responsible for ensuring that
all of its resources are freed prior to calling the end handler.transmitbodyHandler, endHandler, getHeadisFinishedabortCopyright © 2014 JBoss, a division of Red Hat. All rights reserved.