org.mortbay.jetty.nio
Class BlockingChannelConnector
java.lang.Object
org.mortbay.component.AbstractLifeCycle
org.mortbay.jetty.AbstractBuffers
org.mortbay.jetty.AbstractConnector
org.mortbay.jetty.nio.AbstractNIOConnector
org.mortbay.jetty.nio.BlockingChannelConnector
- All Implemented Interfaces:
- LifeCycle, Buffers, Connector, NIOConnector
public class BlockingChannelConnector
- extends AbstractNIOConnector
Blocking NIO connector.
This connector uses efficient NIO buffers with a traditional blocking thread model.
Direct NIO buffers are used and a thread is allocated per connections.
This connector is best used when there are a few very active connections.
- Author:
- gregw
Methods inherited from class org.mortbay.jetty.AbstractConnector |
configure, connectionClosed, connectionOpened, doStart, doStop, getAcceptors, getAcceptQueueSize, getConfidentialPort, getConfidentialScheme, getConnections, getConnectionsDurationAve, getConnectionsDurationMax, getConnectionsDurationMin, getConnectionsDurationTotal, getConnectionsOpen, getConnectionsOpenMax, getConnectionsOpenMin, getConnectionsRequestsAve, getConnectionsRequestsMax, getConnectionsRequestsMin, getHost, getIntegralPort, getIntegralScheme, getLowResourceMaxIdleTime, getMaxIdleTime, getName, getPort, getRequests, getResolveNames, getServer, getSoLingerTime, getStatsOn, getStatsOnMs, getThreadPool, isConfidential, isIntegral, join, newContinuation, persist, setAcceptors, setAcceptQueueSize, setConfidentialPort, setConfidentialScheme, setHost, setIntegralPort, setIntegralScheme, setLowResourceMaxIdleTime, setMaxIdleTime, setName, setPort, setResolveNames, setServer, setSoLingerTime, setStatsOn, setThreadPool, statsReset, stopAccept, toString |
BlockingChannelConnector
public BlockingChannelConnector()
- Constructor.
getConnection
public Object getConnection()
- Returns:
- the underlying socket, channel, buffer etc. for the connector.
open
public void open()
throws IOException
- Description copied from interface:
Connector
- Opens the connector
- 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,
InterruptedException
- Specified by:
accept
in class AbstractConnector
- Throws:
IOException
InterruptedException
customize
public void customize(EndPoint endpoint,
Request request)
throws IOException
- Description copied from interface:
Connector
- Customize a request for an endpoint.
Called on every request to allow customization of the request for
the particular endpoint (eg security properties from a SSL connection).
- Specified by:
customize
in interface Connector
- Overrides:
customize
in class AbstractConnector
- Throws:
IOException
getLocalPort
public int getLocalPort()
- Returns:
- The actual port the connector is listening on or -1 if there
is no port or the connector is not open.