com.sun.grizzly.nio
Class AbstractNIOTransport

java.lang.Object
  extended by com.sun.grizzly.AbstractTransport
      extended by com.sun.grizzly.nio.AbstractNIOTransport
All Implemented Interfaces:
NIOTransport, Transport, ExceptionHandler
Direct Known Subclasses:
TCPNIOTransport, UDPNIOTransport

public abstract class AbstractNIOTransport
extends AbstractTransport
implements NIOTransport

Author:
oleksiys

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sun.grizzly.Transport
Transport.State
 
Nested classes/interfaces inherited from interface com.sun.grizzly.utils.ExceptionHandler
ExceptionHandler.Severity
 
Field Summary
protected  NIOChannelDistributor nioChannelDistributor
           
protected  SelectionKeyHandler selectionKeyHandler
           
protected  SelectorHandler selectorHandler
           
protected  SelectorRunner[] selectorRunners
           
protected  int selectorRunnersCount
           
 
Fields inherited from class com.sun.grizzly.AbstractTransport
attributeBuilder, exceptionHandlers, internalThreadPool, isBlocking, memoryManager, name, processor, processorSelector, readBufferSize, state, strategy, workerThreadPool, writeBufferSize
 
Constructor Summary
AbstractNIOTransport(String name)
           
 
Method Summary
protected abstract  void closeConnection(Connection connection)
          Close the connection, managed by Transport
 NIOChannelDistributor getNioChannelDistributor()
           
 SelectionKeyHandler getSelectionKeyHandler()
           
 SelectorHandler getSelectorHandler()
           
protected  SelectorRunner[] getSelectorRunners()
           
 int getSelectorRunnersCount()
           
 void setNioChannelDistributor(NIOChannelDistributor nioChannelDistributor)
           
 void setSelectionKeyHandler(SelectionKeyHandler selectionKeyHandler)
           
 void setSelectorHandler(SelectorHandler selectorHandler)
           
 void setSelectorRunnersCount(int selectorRunnersCount)
           
protected  void startSelectorRunners()
           
protected  void stopSelectorRunners()
           
 
Methods inherited from class com.sun.grizzly.AbstractTransport
addExceptionHandler, configureBlocking, fireIOEvent, getAttributeBuilder, getInternalThreadPool, getMemoryManager, getName, getProcessor, getProcessorSelector, getReadBufferSize, getState, getStrategy, getWorkerThreadPool, getWriteBufferSize, isBlocking, isStopped, notifyException, pause, removeExceptionHandler, resume, setAttributeBuilder, setInternalThreadPool, setMemoryManager, setName, setProcessor, setProcessorSelector, setReadBufferSize, setStrategy, setWorkerThreadPool, setWriteBufferSize, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.grizzly.nio.NIOTransport
getStrategy, setStrategy
 
Methods inherited from interface com.sun.grizzly.Transport
addExceptionHandler, configureBlocking, fireIOEvent, fireIOEvent, getAttributeBuilder, getInternalThreadPool, getMemoryManager, getName, getProcessor, getProcessorSelector, getReadBufferSize, getState, getWorkerThreadPool, getWriteBufferSize, isBlocking, isStopped, notifyException, pause, removeExceptionHandler, resume, setAttributeBuilder, setInternalThreadPool, setMemoryManager, setName, setProcessor, setProcessorSelector, setReadBufferSize, setWorkerThreadPool, setWriteBufferSize, start, stop
 

Field Detail

selectorHandler

protected SelectorHandler selectorHandler

selectionKeyHandler

protected SelectionKeyHandler selectionKeyHandler

selectorRunnersCount

protected int selectorRunnersCount

selectorRunners

protected SelectorRunner[] selectorRunners

nioChannelDistributor

protected NIOChannelDistributor nioChannelDistributor
Constructor Detail

AbstractNIOTransport

public AbstractNIOTransport(String name)
Method Detail

getSelectionKeyHandler

public SelectionKeyHandler getSelectionKeyHandler()
Specified by:
getSelectionKeyHandler in interface NIOTransport

setSelectionKeyHandler

public void setSelectionKeyHandler(SelectionKeyHandler selectionKeyHandler)
Specified by:
setSelectionKeyHandler in interface NIOTransport

getSelectorHandler

public SelectorHandler getSelectorHandler()
Specified by:
getSelectorHandler in interface NIOTransport

setSelectorHandler

public void setSelectorHandler(SelectorHandler selectorHandler)
Specified by:
setSelectorHandler in interface NIOTransport

getSelectorRunnersCount

public int getSelectorRunnersCount()
Specified by:
getSelectorRunnersCount in interface NIOTransport

setSelectorRunnersCount

public void setSelectorRunnersCount(int selectorRunnersCount)
Specified by:
setSelectorRunnersCount in interface NIOTransport

startSelectorRunners

protected void startSelectorRunners()
                             throws IOException
Throws:
IOException

stopSelectorRunners

protected void stopSelectorRunners()
                            throws IOException
Throws:
IOException

getNioChannelDistributor

public NIOChannelDistributor getNioChannelDistributor()
Specified by:
getNioChannelDistributor in interface NIOTransport

setNioChannelDistributor

public void setNioChannelDistributor(NIOChannelDistributor nioChannelDistributor)
Specified by:
setNioChannelDistributor in interface NIOTransport

getSelectorRunners

protected SelectorRunner[] getSelectorRunners()

closeConnection

protected abstract void closeConnection(Connection connection)
                                 throws IOException
Description copied from class: AbstractTransport
Close the connection, managed by Transport

Specified by:
closeConnection in class AbstractTransport
Throws:
IOException


Copyright © 2009 SUN Microsystems. All Rights Reserved.