io.undertow.server

## Interface ConduitWrapper<T extends org.xnio.conduits.Conduit>

All Known Implementing Classes:
  AllowedContentEncodings

    public interface ConduitWrapper<T extends org.xnio.conduits.Conduit>

Interface that provides a means of wrapping a `Conduit`. Every conduit wrapper has a chance to replace the conduit with a conduit which either wraps or replaces the passed in conduit. However it is the responsibility of either the conduit wrapper instance or the conduit it creates to ensure that the original conduit is eventually cleaned up and shut down properly when the request is terminated.

Author:
  Stuart Douglas

### Method Summary

All Methods Instance Methods Abstract Methods
`T` `wrap(ConduitFactory<T> factory, HttpServerExchange exchange)` Wrap the conduit.

### Method Detail

#### wrap

    T wrap(ConduitFactory<T> factory,
           HttpServerExchange exchange)

Wrap the conduit. The wrapper should not return `null`. If no wrapping is desired, the original conduit should be returned.

Parameters:
  `factory` - the original conduit
  `exchange` - the in-flight HTTP exchange
Returns:
  the replacement conduit