Top Description Fields Constructors Methods
org.glassfish.grizzly

public abstract Class AbstractTransport

extends Object
implements Transport
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.Transport, org.glassfish.grizzly.monitoring.MonitoringAware
Known Direct Subclasses
org.glassfish.grizzly.nio.NIOTransport
Imports
java.io.IOException, java.util.concurrent.ExecutorService, .TimeUnit, org.glassfish.grizzly.attributes.AttributeBuilder, org.glassfish.grizzly.memory.MemoryManager, org.glassfish.grizzly.monitoring.DefaultMonitoringConfig, .MonitoringAware, .MonitoringConfig, org.glassfish.grizzly.threadpool.ThreadPoolConfig, .ThreadPoolProbe, org.glassfish.grizzly.utils.StateHolder

Abstract Transport. Implements common transport functionality.
Author
Alexey Stashok

Field Summary

Modifier and TypeField and Description
protected AttributeBuilder
attributeBuilder

Transport AttributeBuilder, which will be used to create Attributes

protected final DefaultMonitoringConfig<ConnectionProbe>
connectionMonitoringConfig

Connection probes

protected volatile boolean
isBlocking

Transport mode

protected volatile boolean
isStandalone

Deprecated
protected ExecutorService
kernelPool

Kernel thread pool.

protected ThreadPoolConfig
protected boolean
protected MemoryManager<E extends Buffer>
memoryManager

Transport MemoryManager

protected String
name

Transport name

protected Processor<E extends Context>
processor

Transport default Processor

protected ProcessorSelector
processorSelector

Transport default ProcessorSelector

protected int
readBufferSize

Transport default buffer size for read operations

protected long
protected final StateHolder<Transport.State>
state

Transport state controller

protected IOStrategy
strategy

Transport strategy

protected final DefaultMonitoringConfig<ThreadPoolProbe>
threadPoolMonitoringConfig

Thread pool probes

protected final DefaultMonitoringConfig<TransportProbe>
transportMonitoringConfig

Transport probes

protected ThreadPoolConfig
protected ExecutorService
workerThreadPool

Worker thread pool

protected int
writeBufferSize

Transport default buffer size for write operations

protected long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected abstract void
closeConnection(Connection<L> connection)

Close the connection, managed by Transport

public void
protected abstract Object

Returns:

the Transport JMX management object.
createJmxManagementObject
()

Create the Transport JMX management object.

public AttributeBuilder
getAttributeBuilder()

Implements org.glassfish.grizzly.Transport.getAttributeBuilder.

Get Transport associated AttributeBuilder, which will be used by Transport and its Connections to store custom Attributes.

public MonitoringConfig<ConnectionProbe>
public IOStrategy
getIOStrategy()

Implements org.glassfish.grizzly.Transport.getIOStrategy.

Get the IOStrategy implementation, which will be used by Transport to process IOEvent.

public ExecutorService
public ThreadPoolConfig
public MemoryManager<E extends Buffer>
getMemoryManager()

Implements org.glassfish.grizzly.Transport.getMemoryManager.

Get the Transport associated MemoryManager, which will be used by the Transport, its Connections and by during processing I/O events, occurred on Connections.

public MonitoringConfig<TransportProbe>
getMonitoringConfig()

Implements org.glassfish.grizzly.Transport.getMonitoringConfig.

Get the Transport monitoring configuration MonitoringConfig.

public String
public Processor<E extends Context>
getProcessor()

Implements org.glassfish.grizzly.Transport.getProcessor.

Gets the default Processor, which will process Connection I/O events in case, if Connection doesn't have own Processor preferences.

public ProcessorSelector
getProcessorSelector()

Implements org.glassfish.grizzly.Transport.getProcessorSelector.

Gets the default ProcessorSelector, which will be used to get Processor to process Connection I/O events, in case if this Transport's Processor is null and Connection doesn't have neither preferred Processor nor ProcessorSelector.

public int
getReadBufferSize()

Implements org.glassfish.grizzly.Transport.getReadBufferSize.

Get the default size of Buffers, which will be allocated for reading data from Transport's Connections.

public long
getReadTimeout(TimeUnit timeUnit)

Implements org.glassfish.grizzly.Transport.getReadTimeout.

Returns the current value for the blocking read timeout converted to the provided TimeUnit specification.

public StateHolder<Transport.State>
getState()

Implements org.glassfish.grizzly.Transport.getState.

Return the Transport state controller.

public MonitoringConfig<ThreadPoolProbe>
getThreadPoolMonitoringConfig()

Implements org.glassfish.grizzly.Transport.getThreadPoolMonitoringConfig.

Get the monitoring configuration for Transport thread pool.

public ExecutorService
getWorkerThreadPool()

Implements org.glassfish.grizzly.Transport.getWorkerThreadPool.

Get a thread pool, which will run IOEvent processing (depending on Transport IOStrategy) to let kernel threads continue their job.

public ThreadPoolConfig
public int
getWriteBufferSize()

Implements org.glassfish.grizzly.Transport.getWriteBufferSize.

Get the default size of Buffers, which will be allocated for writing data to Transport's Connections.

public long
getWriteTimeout(TimeUnit timeUnit)

Implements org.glassfish.grizzly.Transport.getWriteTimeout.

Returns the current value for the blocking write timeout converted to the provided TimeUnit specification.

public boolean
public boolean
public boolean
public boolean
isStopped()

Implements org.glassfish.grizzly.Transport.isStopped.

Returns true, if this Transport is in stopped state, false otherwise.

protected static void
notifyProbesBeforePause(final AbstractTransport
the Transport event occurred on.
transport
)

Notify registered TransportProbes about the before-pause event.

protected static void
notifyProbesBeforeResume(final AbstractTransport
the Transport event occurred on.
transport
)

Notify registered TransportProbes about the before-resume event.

protected static void
notifyProbesBeforeStart(final AbstractTransport
the Transport event occurred on.
transport
)

Notify registered TransportProbes about the before-start event.

protected static void
notifyProbesBeforeStop(final AbstractTransport
the Transport event occurred on.
transport
)

Notify registered TransportProbes about the before-stop event.

protected static void
notifyProbesConfigChanged(final AbstractTransport
the Transport event occurred on.
transport
)

Notify registered TransportProbes about the config changed event.

protected static void
notifyProbesPause(final AbstractTransport
the Transport event occurred on.
transport
)

Notify registered TransportProbes about the pause event.

protected static void
notifyProbesStop(final AbstractTransport
the Transport event occurred on.
transport
)

Notify registered TransportProbes about the stop event.

public Processor<E extends Context>
obtainProcessor(IOEvent ioEvent, Connection<L> connection)

Implements org.glassfish.grizzly.Transport.obtainProcessor.

Gets the default Processor, which will process Transport Connections I/O events in case, if Connection doesn't have own Processor preferences.

public void
setAttributeBuilder(AttributeBuilder attributeBuilder)

Implements org.glassfish.grizzly.Transport.setAttributeBuilder.

Set Transport associated AttributeBuilder, which will be used by Transport and its Connections to store custom Attributes.

public void
setIOStrategy(IOStrategy IOStrategy)

Implements org.glassfish.grizzly.Transport.setIOStrategy.

Set the IOStrategy implementation, which will be used by Transport to process IOEvent.

protected void
setKernelPool0(final ExecutorService kernelPool)

public void
setKernelThreadPool(ExecutorService kernelPool)

Implements org.glassfish.grizzly.Transport.setKernelThreadPool.

Set a thread pool which will run Transport internal tasks.

public void
setKernelThreadPoolConfig(ThreadPoolConfig kernelPoolConfig)

Implements org.glassfish.grizzly.Transport.setKernelThreadPoolConfig.

Set the ThreadPoolConfig to be used by the Transport internal thread pool.

public void
setMemoryManager(MemoryManager<E extends Buffer> memoryManager)

Implements org.glassfish.grizzly.Transport.setMemoryManager.

Set the Transport associated MemoryManager, which will be used by the Transport, its Connections and by during processing I/O events, occurred on Connections.

public void
public void
setProcessor(Processor<E extends Context> processor)

Implements org.glassfish.grizzly.Transport.setProcessor.

Sets the default Processor, which will process Connection I/O events in case, if Connection doesn't have own Processor preferences.

public void
setProcessorSelector(ProcessorSelector selector)

Implements org.glassfish.grizzly.Transport.setProcessorSelector.

Sets the default ProcessorSelector, which will be used to get Processor to process Connection I/O events, in case if this Transport's Processor is null and Connection doesn't have neither preferred Processor nor ProcessorSelector.

public void
setReadBufferSize(int readBufferSize)

Implements org.glassfish.grizzly.Transport.setReadBufferSize.

Set the default size of Buffers, which will be allocated for reading data from Transport's Connections.

public void
setReadTimeout(long timeout, TimeUnit timeUnit)

Implements org.glassfish.grizzly.Transport.setReadTimeout.

Specifies the timeout for the blocking reads.

public void
setWorkerThreadPool(final ExecutorService threadPool)

Implements org.glassfish.grizzly.Transport.setWorkerThreadPool.

Set a thread pool, which will run IOEvent processing (depending on Transport IOStrategy) to let kernel threads continue their job.

protected void
public void
setWorkerThreadPoolConfig(ThreadPoolConfig workerPoolConfig)

Implements org.glassfish.grizzly.Transport.setWorkerThreadPoolConfig.

Set the ThreadPoolConfig to be used by the worker thread pool.

public void
setWriteBufferSize(int writeBufferSize)

Implements org.glassfish.grizzly.Transport.setWriteBufferSize.

Set the default size of Buffers, which will be allocated for writing data to Transport's Connections.

public void
setWriteTimeout(long timeout, TimeUnit timeUnit)

Implements org.glassfish.grizzly.Transport.setWriteTimeout.

Specifies the timeout for the blocking writes.

public void
stop()

Implements org.glassfish.grizzly.Transport.stop.

Deprecated

Stops the transport and closes all the connections

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributeBuilderback to summary
protected AttributeBuilder attributeBuilder

Transport AttributeBuilder, which will be used to create Attributes

connectionMonitoringConfigback to summary
protected final DefaultMonitoringConfig<ConnectionProbe> connectionMonitoringConfig

Connection probes

isBlockingback to summary
protected volatile boolean isBlocking

Transport mode

isStandaloneback to summary
protected volatile boolean isStandalone

Deprecated

Annotations
@Deprecated
kernelPoolback to summary
protected ExecutorService kernelPool

Kernel thread pool.

kernelPoolConfigback to summary
protected ThreadPoolConfig kernelPoolConfig
managedWorkerPoolback to summary
protected boolean managedWorkerPool
memoryManagerback to summary
protected MemoryManager<E extends Buffer> memoryManager

Transport MemoryManager

nameback to summary
protected String name

Transport name

processorback to summary
protected Processor<E extends Context> processor

Transport default Processor

processorSelectorback to summary
protected ProcessorSelector processorSelector

Transport default ProcessorSelector

readBufferSizeback to summary
protected int readBufferSize

Transport default buffer size for read operations

readTimeoutback to summary
protected long readTimeout
stateback to summary
protected final StateHolder<Transport.State> state

Transport state controller

strategyback to summary
protected IOStrategy strategy

Transport strategy

threadPoolMonitoringConfigback to summary
protected final DefaultMonitoringConfig<ThreadPoolProbe> threadPoolMonitoringConfig

Thread pool probes

transportMonitoringConfigback to summary
protected final DefaultMonitoringConfig<TransportProbe> transportMonitoringConfig

Transport probes

workerPoolConfigback to summary
protected ThreadPoolConfig workerPoolConfig
workerThreadPoolback to summary
protected ExecutorService workerThreadPool

Worker thread pool

writeBufferSizeback to summary
protected int writeBufferSize

Transport default buffer size for write operations

writeTimeoutback to summary
protected long writeTimeout

Constructor Detail

AbstractTransportback to summary
public AbstractTransport(String name)

Method Detail

closeConnectionback to summary
protected abstract void closeConnection(Connection<L> connection) throws IOException

Close the connection, managed by Transport

Parameters
connection:Connection<L>

org.glassfish.grizzly.nio.NIOConnection to close

Exceptions
IOException:
not used
configureBlockingback to summary
public void configureBlocking(boolean isBlocking)

Implements org.glassfish.grizzly.Transport.configureBlocking.

Doc from org.glassfish.grizzly.Transport.configureBlocking.

Sets the Transport mode. Specific Transport Connections may override this setting by Connection#configureBlocking(boolean).

Annotations
@Override
createJmxManagementObjectback to summary
protected abstract Object createJmxManagementObject()

Create the Transport JMX management object.

Returns:Object

the Transport JMX management object.

getAttributeBuilderback to summary
public AttributeBuilder getAttributeBuilder()

Implements org.glassfish.grizzly.Transport.getAttributeBuilder.

Doc from org.glassfish.grizzly.Transport.getAttributeBuilder.

Get Transport associated AttributeBuilder, which will be used by Transport and its Connections to store custom Attributes.

Annotations
@Override
getConnectionMonitoringConfigback to summary
public MonitoringConfig<ConnectionProbe> getConnectionMonitoringConfig()

Implements org.glassfish.grizzly.Transport.getConnectionMonitoringConfig.

Doc from org.glassfish.grizzly.Transport.getConnectionMonitoringConfig.

Get the monitoring configuration for Transport Connections.

Annotations
@Override
getIOStrategyback to summary
public IOStrategy getIOStrategy()

Implements org.glassfish.grizzly.Transport.getIOStrategy.

Doc from org.glassfish.grizzly.Transport.getIOStrategy.

Get the IOStrategy implementation, which will be used by Transport to process IOEvent. IOStrategy is responsible for choosing the way, how I/O event will be processed: using current Thread, worker Thread; or make any other decisions.

Annotations
@Override
getKernelThreadPoolback to summary
public ExecutorService getKernelThreadPool()

Implements org.glassfish.grizzly.Transport.getKernelThreadPool.

Annotations
@Override
getKernelThreadPoolConfigback to summary
public ThreadPoolConfig getKernelThreadPoolConfig()

Implements org.glassfish.grizzly.Transport.getKernelThreadPoolConfig.

Annotations
@Override
getMemoryManagerback to summary
public MemoryManager<E extends Buffer> getMemoryManager()

Implements org.glassfish.grizzly.Transport.getMemoryManager.

Doc from org.glassfish.grizzly.Transport.getMemoryManager.

Get the Transport associated MemoryManager, which will be used by the Transport, its Connections and by during processing I/O events, occurred on Connections.

Annotations
@Override
getMonitoringConfigback to summary
public MonitoringConfig<TransportProbe> getMonitoringConfig()

Implements org.glassfish.grizzly.Transport.getMonitoringConfig.

Doc from org.glassfish.grizzly.Transport.getMonitoringConfig.

Get the Transport monitoring configuration MonitoringConfig.

Annotations
@Override
getNameback to summary
public String getName()

Implements org.glassfish.grizzly.Transport.getName.

Doc from org.glassfish.grizzly.Transport.getName.

Gets the Transport name.

Annotations
@Override
getProcessorback to summary
public Processor<E extends Context> getProcessor()

Implements org.glassfish.grizzly.Transport.getProcessor.

Doc from org.glassfish.grizzly.Transport.getProcessor.

Gets the default Processor, which will process Connection I/O events in case, if Connection doesn't have own Processor preferences. If Transport associated Processor is null, and Connection doesn't have any preferred Processor - then Transport will try to get Processor using ProcessorSelector#select(IOEvent, Connection).

Annotations
@Override
getProcessorSelectorback to summary
public ProcessorSelector getProcessorSelector()

Implements org.glassfish.grizzly.Transport.getProcessorSelector.

Doc from org.glassfish.grizzly.Transport.getProcessorSelector.

Gets the default ProcessorSelector, which will be used to get Processor to process Connection I/O events, in case if this Transport's Processor is null and Connection doesn't have neither preferred Processor nor ProcessorSelector. Transport's ProcessorSelector is the last place, where Transport will try to get Processor to process Connection I/O event. If ProcessorSelector is not set - IllegalStateException will be thrown.

Annotations
@Override
getReadBufferSizeback to summary
public int getReadBufferSize()

Implements org.glassfish.grizzly.Transport.getReadBufferSize.

Doc from org.glassfish.grizzly.Transport.getReadBufferSize.

Get the default size of Buffers, which will be allocated for reading data from Transport's Connections. For particular Connection, this setting could be overridden by Connection#getReadBufferSize().

Annotations
@Override
getReadTimeoutback to summary
public long getReadTimeout(TimeUnit timeUnit)

Implements org.glassfish.grizzly.Transport.getReadTimeout.

Doc from org.glassfish.grizzly.Transport.getReadTimeout.

Returns the current value for the blocking read timeout converted to the provided TimeUnit specification. If this value hasn't been explicitly set, it will default to 30 seconds.

Annotations
@Override
getStateback to summary
public StateHolder<Transport.State> getState()

Implements org.glassfish.grizzly.Transport.getState.

Doc from org.glassfish.grizzly.Transport.getState.

Return the Transport state controller. Using the state controller, it is possible to get/set the Transport state in thread-safe manner.

Annotations
@Override
getThreadPoolMonitoringConfigback to summary
public MonitoringConfig<ThreadPoolProbe> getThreadPoolMonitoringConfig()

Implements org.glassfish.grizzly.Transport.getThreadPoolMonitoringConfig.

Doc from org.glassfish.grizzly.Transport.getThreadPoolMonitoringConfig.

Get the monitoring configuration for Transport thread pool.

Annotations
@Override
getWorkerThreadPoolback to summary
public ExecutorService getWorkerThreadPool()

Implements org.glassfish.grizzly.Transport.getWorkerThreadPool.

Doc from org.glassfish.grizzly.Transport.getWorkerThreadPool.

Get a thread pool, which will run IOEvent processing (depending on Transport IOStrategy) to let kernel threads continue their job.

Annotations
@Override
getWorkerThreadPoolConfigback to summary
public ThreadPoolConfig getWorkerThreadPoolConfig()

Implements org.glassfish.grizzly.Transport.getWorkerThreadPoolConfig.

Annotations
@Override
getWriteBufferSizeback to summary
public int getWriteBufferSize()

Implements org.glassfish.grizzly.Transport.getWriteBufferSize.

Doc from org.glassfish.grizzly.Transport.getWriteBufferSize.

Get the default size of Buffers, which will be allocated for writing data to Transport's Connections. For particular Connection, this setting could be overridden by Connection#getWriteBufferSize().

Annotations
@Override
getWriteTimeoutback to summary
public long getWriteTimeout(TimeUnit timeUnit)

Implements org.glassfish.grizzly.Transport.getWriteTimeout.

Doc from org.glassfish.grizzly.Transport.getWriteTimeout.

Returns the current value for the blocking write timeout converted to the provided TimeUnit specification. If this value hasn't been explicitly set, it will default to 30 seconds.

Annotations
@Override
isBlockingback to summary
public boolean isBlocking()

Implements org.glassfish.grizzly.Transport.isBlocking.

Doc from org.glassfish.grizzly.Transport.isBlocking.

Returns the Transport mode. true, if Transport is operating in blocking mode, or false otherwise. Specific Transport Connections may override this setting by Connection#isBlocking().

Annotations
@Override
isPausedback to summary
public boolean isPaused()

Implements org.glassfish.grizzly.Transport.isPaused.

Annotations
@Override
isStandaloneback to summary
public boolean isStandalone()

Implements org.glassfish.grizzly.Transport.isStandalone.

Annotations
@Override
isStoppedback to summary
public boolean isStopped()

Implements org.glassfish.grizzly.Transport.isStopped.

Doc from org.glassfish.grizzly.Transport.isStopped.

Returns true, if this Transport is in stopped state, false otherwise.

Annotations
@Override
notifyProbesBeforePauseback to summary
protected static void notifyProbesBeforePause(final AbstractTransport transport)

Notify registered TransportProbes about the before-pause event.

Parameters
transport:AbstractTransport

the Transport event occurred on.

Since
3.0
notifyProbesBeforeResumeback to summary
protected static void notifyProbesBeforeResume(final AbstractTransport transport)

Notify registered TransportProbes about the before-resume event.

Parameters
transport:AbstractTransport

the Transport event occurred on.

Since
3.0
notifyProbesBeforeStartback to summary
protected static void notifyProbesBeforeStart(final AbstractTransport transport)

Notify registered TransportProbes about the before-start event.

Parameters
transport:AbstractTransport

the Transport event occurred on.

Since
3.0
notifyProbesBeforeStopback to summary
protected static void notifyProbesBeforeStop(final AbstractTransport transport)

Notify registered TransportProbes about the before-stop event.

Parameters
transport:AbstractTransport

the Transport event occurred on.

Since
3.0
notifyProbesConfigChangedback to summary
protected static void notifyProbesConfigChanged(final AbstractTransport transport)

Notify registered TransportProbes about the config changed event.

Parameters
transport:AbstractTransport

the Transport event occurred on.

notifyProbesPauseback to summary
protected static void notifyProbesPause(final AbstractTransport transport)

Notify registered TransportProbes about the pause event.

Parameters
transport:AbstractTransport

the Transport event occurred on.

notifyProbesStopback to summary
protected static void notifyProbesStop(final AbstractTransport transport)

Notify registered TransportProbes about the stop event.

Parameters
transport:AbstractTransport

the Transport event occurred on.

obtainProcessorback to summary
public Processor<E extends Context> obtainProcessor(IOEvent ioEvent, Connection<L> connection)

Implements org.glassfish.grizzly.Transport.obtainProcessor.

Doc from org.glassfish.grizzly.Transport.obtainProcessor.

Gets the default Processor, which will process Transport Connections I/O events in case, if Connection doesn't have own Processor preferences. If Transport associated Processor is null, and Connection doesn't have any preferred Processor - then Transport will try to get Processor using ProcessorSelector#select(IOEvent, Connection).

Annotations
@Override
setAttributeBuilderback to summary
public void setAttributeBuilder(AttributeBuilder attributeBuilder)

Implements org.glassfish.grizzly.Transport.setAttributeBuilder.

Doc from org.glassfish.grizzly.Transport.setAttributeBuilder.

Set Transport associated AttributeBuilder, which will be used by Transport and its Connections to store custom Attributes.

Annotations
@Override
setIOStrategyback to summary
public void setIOStrategy(IOStrategy IOStrategy)

Implements org.glassfish.grizzly.Transport.setIOStrategy.

Doc from org.glassfish.grizzly.Transport.setIOStrategy.

Set the IOStrategy implementation, which will be used by Transport to process IOEvent. IOStrategy is responsible for choosing the way, how I/O event will be processed: using current Thread, worker Thread; or make any other decisions.

Annotations
@Override
setKernelPool0back to summary
protected void setKernelPool0(final ExecutorService kernelPool)
setKernelThreadPoolback to summary
public void setKernelThreadPool(ExecutorService kernelPool)

Implements org.glassfish.grizzly.Transport.setKernelThreadPool.

Doc from org.glassfish.grizzly.Transport.setKernelThreadPool.

Set a thread pool which will run Transport internal tasks. For example org.glassfish.grizzly.nio.SelectorRunner threads for NIO.

Annotations
@Override
setKernelThreadPoolConfigback to summary
public void setKernelThreadPoolConfig(ThreadPoolConfig kernelPoolConfig)

Implements org.glassfish.grizzly.Transport.setKernelThreadPoolConfig.

Doc from org.glassfish.grizzly.Transport.setKernelThreadPoolConfig.

Set the ThreadPoolConfig to be used by the Transport internal thread pool.

Annotations
@Override
setMemoryManagerback to summary
public void setMemoryManager(MemoryManager<E extends Buffer> memoryManager)

Implements org.glassfish.grizzly.Transport.setMemoryManager.

Doc from org.glassfish.grizzly.Transport.setMemoryManager.

Set the Transport associated MemoryManager, which will be used by the Transport, its Connections and by during processing I/O events, occurred on Connections.

Annotations
@Override
setNameback to summary
public void setName(String name)

Implements org.glassfish.grizzly.Transport.setName.

Doc from org.glassfish.grizzly.Transport.setName.

Sets the Transport name.

Annotations
@Override
setProcessorback to summary
public void setProcessor(Processor<E extends Context> processor)

Implements org.glassfish.grizzly.Transport.setProcessor.

Doc from org.glassfish.grizzly.Transport.setProcessor.

Sets the default Processor, which will process Connection I/O events in case, if Connection doesn't have own Processor preferences.

Annotations
@Override
setProcessorSelectorback to summary
public void setProcessorSelector(ProcessorSelector selector)

Implements org.glassfish.grizzly.Transport.setProcessorSelector.

Doc from org.glassfish.grizzly.Transport.setProcessorSelector.

Sets the default ProcessorSelector, which will be used to get Processor to process Connection I/O events, in case if this Transport's Processor is null and Connection doesn't have neither preferred Processor nor ProcessorSelector. Transport's ProcessorSelector is the last place, where Transport will try to get Processor to process Connection I/O event. If ProcessorSelector is not set - IllegalStateException will be thrown.

Annotations
@Override
setReadBufferSizeback to summary
public void setReadBufferSize(int readBufferSize)

Implements org.glassfish.grizzly.Transport.setReadBufferSize.

Doc from org.glassfish.grizzly.Transport.setReadBufferSize.

Set the default size of Buffers, which will be allocated for reading data from Transport's Connections. For particular Connection, this setting could be overridden by Connection#setReadBufferSize(int). If not explicitly configured, this value will be set to DEFAULT_READ_BUFFER_SIZE.

Annotations
@Override
setReadTimeoutback to summary
public void setReadTimeout(long timeout, TimeUnit timeUnit)

Implements org.glassfish.grizzly.Transport.setReadTimeout.

Doc from org.glassfish.grizzly.Transport.setReadTimeout.

Specifies the timeout for the blocking reads. This may be overridden on a per-connection basis. A value of zero or less effectively disables the timeout.

Annotations
@Override
setWorkerThreadPoolback to summary
public void setWorkerThreadPool(final ExecutorService threadPool)

Implements org.glassfish.grizzly.Transport.setWorkerThreadPool.

Doc from org.glassfish.grizzly.Transport.setWorkerThreadPool.

Set a thread pool, which will run IOEvent processing (depending on Transport IOStrategy) to let kernel threads continue their job.

Annotations
@SuppressWarnings:unchecked
@Override
setWorkerThreadPool0back to summary
protected void setWorkerThreadPool0(final ExecutorService threadPool)
setWorkerThreadPoolConfigback to summary
public void setWorkerThreadPoolConfig(ThreadPoolConfig workerPoolConfig)

Implements org.glassfish.grizzly.Transport.setWorkerThreadPoolConfig.

Doc from org.glassfish.grizzly.Transport.setWorkerThreadPoolConfig.

Set the ThreadPoolConfig to be used by the worker thread pool.

Annotations
@Override
setWriteBufferSizeback to summary
public void setWriteBufferSize(int writeBufferSize)

Implements org.glassfish.grizzly.Transport.setWriteBufferSize.

Doc from org.glassfish.grizzly.Transport.setWriteBufferSize.

Set the default size of Buffers, which will be allocated for writing data to Transport's Connections. For particular Connection, this setting could be overridden by Connection#setWriteBufferSize(int).

Annotations
@Override
setWriteTimeoutback to summary
public void setWriteTimeout(long timeout, TimeUnit timeUnit)

Implements org.glassfish.grizzly.Transport.setWriteTimeout.

Doc from org.glassfish.grizzly.Transport.setWriteTimeout.

Specifies the timeout for the blocking writes. This may be overridden on a per-connection basis. A value of zero or less effectively disables the timeout.

Annotations
@Override
stopback to summary
public void stop() throws IOException

Implements org.glassfish.grizzly.Transport.stop.

Doc from org.glassfish.grizzly.Transport.stop.

Deprecated

Stops the transport and closes all the connections

Annotations
@Deprecated
@Override
Exceptions
IOException:
if there was an error shutting down