public void addResponseCommitListener ( final ResponseCommitListener listener ) { //technically it is possible to modify the exchange after the response conduit has been created //as the response channel should not be retrieved until it is about to be written to //if we get complaints about this we can add support for it, however it makes the exchange bigger and the connectors more complex addResponseWrapper ( new ConduitWrapper < StreamSinkConduit > ( ) { @ Override public StreamSinkConduit wrap ( ConduitFactory < StreamSinkConduit > factory , HttpServerExchange exchange ) { listener . beforeCommit ( exchange ) ; return factory . create ( ) ; } } ) ; }
Adds a listener that will be invoked on response commit