Class TransportFilter

java.lang.Object
org.glassfish.grizzly.filterchain.BaseFilter
org.glassfish.grizzly.filterchain.TransportFilter
All Implemented Interfaces:
Filter
Direct Known Subclasses:
SSLBaseFilter.SSLTransportFilterWrapper

public class TransportFilter extends BaseFilter
Transport Filter implementation, which should work with any Transport. This Filter tries to delegate I/O event processing to the Transport's specific transport Filter. If Transport doesn't have own implementation - uses common I/O event processing logic. TransportFilter could be set to work in 2 modes: stream or message. In stream mode, TransportFilter produces/consumes the socket channel directly. In message mode, TransportFilter represents Connection data as Buffer, using FilterChainContext.getMessage()}, FilterChainContext.setMessage(Object). For specific Transport, one mode could be more preferable than another. For example TCPNIOTransport works just in stream mode. UDPNIOTransport prefers message mode, but could also work in stream mode.
Author:
Alexey Stashok