Top Description Inners Fields Constructors Methods
org.mortbay.jetty.nio

public Class BlockingChannelConnector

extends AbstractNIOConnector
Class Inheritance
Imports
java.io.IOException, java.net.InetSocketAddress, .Socket, java.nio.channels.ByteChannel, .ServerSocketChannel, .SocketChannel, org.mortbay.io.EndPoint, org.mortbay.io.nio.ChannelEndPoint, org.mortbay.jetty.EofException, .HttpConnection, .HttpException, .Request, org.mortbay.log.Log

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private transient ServerSocketChannel

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
accept(int acceptorID)

Implements abstract org.mortbay.jetty.AbstractConnector.accept.

public void
public void
customize(EndPoint endpoint, Request request)

Overrides org.mortbay.jetty.AbstractConnector.customize.

Implements org.mortbay.jetty.Connector.customize.

Customize a request for an endpoint.
public Object
public int
public void
open()

Implements org.mortbay.jetty.Connector.open.

Opens the connector
Inherited from org.mortbay.jetty.nio.AbstractNIOConnector:
getUseDirectBuffersnewBuffersetUseDirectBuffers

Field Detail

_acceptChannelback to summary
private transient ServerSocketChannel _acceptChannel

Constructor Detail

BlockingChannelConnectorback to summary
public BlockingChannelConnector()

Constructor.

Method Detail

acceptback to summary
public void accept(int acceptorID) throws IOException, InterruptedException

Implements abstract org.mortbay.jetty.AbstractConnector.accept.

closeback to summary
public void close() throws IOException

Implements org.mortbay.jetty.Connector.close.

customizeback to summary
public void customize(EndPoint endpoint, Request request) throws IOException

Overrides org.mortbay.jetty.AbstractConnector.customize.

Implements org.mortbay.jetty.Connector.customize.

Doc from org.mortbay.jetty.Connector.customize.

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).

getConnectionback to summary
public Object getConnection()

Implements org.mortbay.jetty.Connector.getConnection.

Returns:Object

Doc from org.mortbay.jetty.Connector.getConnection.

the underlying socket, channel, buffer etc. for the connector.

getLocalPortback to summary
public int getLocalPort()

Implements org.mortbay.jetty.Connector.getLocalPort.

Returns:int

Doc from org.mortbay.jetty.Connector.getLocalPort.

The actual port the connector is listening on or -1 if there is no port or the connector is not open.

openback to summary
public void open() throws IOException

Implements org.mortbay.jetty.Connector.open.

Doc from org.mortbay.jetty.Connector.open.

Opens the connector

org.mortbay.jetty.nio back to summary

private Class BlockingChannelConnector.Connection

extends ChannelEndPoint
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable

Field Summary

Modifier and TypeField and Description
pack-priv HttpConnection
pack-priv boolean
pack-priv int
Inherited from org.mortbay.io.nio.ChannelEndPoint:
_channel_gather2_local_remote_socket

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.
Inherited from org.mortbay.io.nio.ChannelEndPoint:
blockReadableblockWritableclosefillflushflushflushgetChannelgetLocalAddrgetLocalHostgetLocalPortgetRemoteAddrgetRemoteHostgetRemotePortgetTransportisBlockingisBufferingInputisBufferingOutputisBufferredisOpenshutdownOutput

Field Detail

_connectionback to summary
pack-priv HttpConnection _connection
_dispatchedback to summary
pack-priv boolean _dispatched
_sotimeoutback to summary
pack-priv int _sotimeout

Constructor Detail

Connectionback to summary
pack-priv Connection(ByteChannel channel)

Method Detail

dispatchback to summary
pack-priv void dispatch() throws IOException
runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.