public abstract class NIOTransport extends AbstractTransport
Transport.State| Modifier and Type | Field and Description |
|---|---|
protected NIOChannelDistributor |
nioChannelDistributor |
protected static Random |
RANDOM |
protected SelectionKeyHandler |
selectionKeyHandler |
protected SelectorHandler |
selectorHandler |
protected SelectorProvider |
selectorProvider |
protected SelectorRunner[] |
selectorRunners |
protected int |
selectorRunnersCount |
attributeBuilder, connectionMonitoringConfig, isBlocking, isStandalone, kernelPool, kernelPoolConfig, managedWorkerPool, memoryManager, name, processor, processorSelector, readBufferSize, state, strategy, threadPoolMonitoringConfig, transportMonitoringConfig, workerPoolConfig, workerThreadPool, writeBufferSizeDEFAULT_READ_BUFFER_SIZE| Constructor and Description |
|---|
NIOTransport(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
closeConnection(Connection connection)
Close the connection, managed by Transport
|
NIOChannelDistributor |
getNIOChannelDistributor() |
SelectionKeyHandler |
getSelectionKeyHandler() |
SelectorHandler |
getSelectorHandler() |
SelectorProvider |
getSelectorProvider()
Get the
SelectorProvider to be used by this transport. |
protected SelectorRunner[] |
getSelectorRunners() |
int |
getSelectorRunnersCount() |
protected static void |
notifyProbesError(NIOTransport transport,
Throwable error)
Notify registered
TransportProbes about the error. |
protected static void |
notifyProbesPause(NIOTransport transport)
Notify registered
TransportProbes about the pause event. |
protected static void |
notifyProbesResume(NIOTransport transport)
Notify registered
TransportProbes about the resume event. |
protected static void |
notifyProbesStart(NIOTransport transport)
Notify registered
TransportProbes about the start event. |
protected static void |
notifyProbesStop(NIOTransport transport)
Notify registered
TransportProbes about the stop event. |
void |
notifyTransportError(Throwable error)
Method gets invoked, when error occur during the Transport lifecycle.
|
void |
setNIOChannelDistributor(NIOChannelDistributor nioChannelDistributor) |
void |
setSelectionKeyHandler(SelectionKeyHandler selectionKeyHandler) |
void |
setSelectorHandler(SelectorHandler selectorHandler) |
void |
setSelectorProvider(SelectorProvider selectorProvider)
Set the
SelectorProvider to be used by this transport. |
void |
setSelectorRunnersCount(int selectorRunnersCount) |
void |
start()
Starts the transport
|
protected void |
startSelectorRunners() |
protected void |
stopSelectorRunners() |
configureBlocking, createJmxManagementObject, getAttributeBuilder, getConnectionMonitoringConfig, getIOStrategy, getKernelThreadPool, getKernelThreadPoolConfig, getMemoryManager, getMonitoringConfig, getName, getProcessor, getProcessorSelector, getReadBufferSize, getState, getThreadPoolMonitoringConfig, getWorkerThreadPool, getWorkerThreadPoolConfig, getWriteBufferSize, isBlocking, isPaused, isStandalone, isStopped, notifyProbesConfigChanged, obtainProcessor, pause, resume, setAttributeBuilder, setIOStrategy, setKernelPool0, setKernelThreadPool, setKernelThreadPoolConfig, setMemoryManager, setName, setProcessor, setProcessorSelector, setReadBufferSize, setWorkerThreadPool, setWorkerThreadPool0, setWorkerThreadPoolConfig, setWriteBufferSize, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconfigureStandalone, fireIOEvent, getReader, getReader, getWriter, getWriterprotected static final Random RANDOM
protected SelectorHandler selectorHandler
protected SelectionKeyHandler selectionKeyHandler
protected int selectorRunnersCount
protected SelectorRunner[] selectorRunners
protected NIOChannelDistributor nioChannelDistributor
protected SelectorProvider selectorProvider
public NIOTransport(String name)
public SelectionKeyHandler getSelectionKeyHandler()
public void setSelectionKeyHandler(SelectionKeyHandler selectionKeyHandler)
public SelectorHandler getSelectorHandler()
public void setSelectorHandler(SelectorHandler selectorHandler)
public int getSelectorRunnersCount()
public void setSelectorRunnersCount(int selectorRunnersCount)
public SelectorProvider getSelectorProvider()
SelectorProvider to be used by this transport.SelectorProvider to be used by this transport.public void setSelectorProvider(SelectorProvider selectorProvider)
SelectorProvider to be used by this transport.selectorProvider - the SelectorProvider.public void start()
throws IOException
AbstractTransportstart in interface Transportstart in class AbstractTransportIOExceptionprotected void startSelectorRunners()
throws IOException
IOExceptionprotected void stopSelectorRunners()
throws IOException
IOExceptionpublic NIOChannelDistributor getNIOChannelDistributor()
public void setNIOChannelDistributor(NIOChannelDistributor nioChannelDistributor)
public void notifyTransportError(Throwable error)
error - Throwable.protected SelectorRunner[] getSelectorRunners()
protected static void notifyProbesError(NIOTransport transport, Throwable error)
TransportProbes about the error.transport - the Transport event occurred on.protected static void notifyProbesStart(NIOTransport transport)
TransportProbes about the start event.transport - the Transport event occurred on.protected static void notifyProbesStop(NIOTransport transport)
TransportProbes about the stop event.transport - the Transport event occurred on.protected static void notifyProbesPause(NIOTransport transport)
TransportProbes about the pause event.transport - the Transport event occurred on.protected static void notifyProbesResume(NIOTransport transport)
TransportProbes about the resume event.transport - the Transport event occurred on.protected abstract void closeConnection(Connection connection) throws IOException
AbstractTransportcloseConnection in class AbstractTransportIOExceptionCopyright © 2013 Oracle Corporation. All Rights Reserved.