Class TransportFilter

java.lang.Object
org.glassfish.jersey.jdk.connector.internal.Filter<ByteBuffer,ByteBuffer,Void,ByteBuffer>
org.glassfish.jersey.jdk.connector.internal.TransportFilter

class TransportFilter extends Filter<ByteBuffer,ByteBuffer,Void,ByteBuffer>
Writes and reads data to and from a socket. Only one write(ByteBuffer, org.glassfish.jersey.jdk.connector.internal.CompletionHandler) method call can be processed at a time. Only one _read(ByteBuffer) operation is supported at a time, another one is started only after the previous one has completed. Blocking in Filter.onRead(Object) or Filter.onConnect() method will result in data not being read from a socket until these methods have completed.
  • Field Details

  • Constructor Details

    • TransportFilter

      TransportFilter(int inputBufferSize, ThreadPoolConfig threadPoolConfig, int containerIdleTimeout)
      Constructor.

      If the channel group is not active (all connections have been closed and the shutdown timeout is running) and a new transport is created with tread pool configuration different from the one of the current thread pool, the current thread pool will be shut down and a new one created with the new configuration.

      Parameters:
      inputBufferSize - size of buffer to be allocated for reading data from a socket.
      threadPoolConfig - thread pool configuration used for creating thread pool.
      containerIdleTimeout - idle time after which the shared thread pool will be destroyed.
  • Method Details