org.mortbay.jetty.nio
Class SelectBlockingChannelConnector

java.lang.Object
  extended by org.mortbay.component.AbstractLifeCycle
      extended by org.mortbay.jetty.AbstractConnector
          extended by org.mortbay.jetty.nio.SelectBlockingChannelConnector
All Implemented Interfaces:
LifeCycle, Buffers, Connector

public class SelectBlockingChannelConnector
extends AbstractConnector

Selecting Blocking NIO connector. This connector uses efficient NIO buffers with a non blocking threading model for idle connections. When a connection receives a request, it is switched to a traditional blocking IO model. This connector is best used when there are a very many low activity connections. Even then the SelectChannelConnector may give better performance.

Author:
gregw

Nested Class Summary
private  class SelectBlockingChannelConnector.HttpEndPoint
           
 
Field Summary
private  ServerSocketChannel _acceptChannel
           
private  SelectionKey _acceptKey
           
private  Selector _selector
           
private  ArrayList _unDispatched
           
 
Fields inherited from class org.mortbay.jetty.AbstractConnector
_maxIdleTime, _soLingerTime
 
Constructor Summary
SelectBlockingChannelConnector()
          Constructor.
 
Method Summary
 void accept(int acceptorID)
           
 void close()
           
protected  Buffer newBuffer(int size)
           
 void open()
           
 
Methods inherited from class org.mortbay.jetty.AbstractConnector
configure, customize, doStart, doStop, getAcceptors, getAcceptQueueSize, getAddress, getBuffer, getConfidentialPort, getConfidentialScheme, getHeaderBufferSize, getHost, getIntegralPort, getIntegralScheme, getMaxIdleTime, getPort, getRequestBufferSize, getResponseBufferSize, getServer, getSoLingerTime, getThreadPool, isConfidential, isIntegral, join, newContinuation, returnBuffer, setAcceptors, setAcceptQueueSize, setConfidentialPort, setConfidentialScheme, setHeaderBufferSize, setHost, setIntegralPort, setIntegralScheme, setMaxIdleTime, setPort, setRequestBufferSize, setResponseBufferSize, setServer, setSoLingerTime, setThreadPool, toString
 
Methods inherited from class org.mortbay.component.AbstractLifeCycle
isFailed, isRunning, isStarted, isStarting, isStopping, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mortbay.component.LifeCycle
isFailed, isRunning, isStarted, isStarting, isStopping, start, stop
 

Field Detail

_acceptChannel

private transient ServerSocketChannel _acceptChannel

_acceptKey

private transient SelectionKey _acceptKey

_selector

private transient Selector _selector

_unDispatched

private transient ArrayList _unDispatched
Constructor Detail

SelectBlockingChannelConnector

public SelectBlockingChannelConnector()
Constructor.

Method Detail

open

public void open()
          throws IOException
Specified by:
open in interface Connector
Specified by:
open in class AbstractConnector
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

accept

public void accept(int acceptorID)
            throws IOException
Specified by:
accept in class AbstractConnector
Throws:
IOException

newBuffer

protected Buffer newBuffer(int size)
Specified by:
newBuffer in class AbstractConnector