org.mortbay.jetty
Interface Connector

All Superinterfaces:
Buffers, LifeCycle
All Known Implementing Classes:
AbstractConnector, BlockingChannelConnector, SelectBlockingChannelConnector, SelectChannelConnector, SocketConnector, SslSocketConnector

public interface Connector
extends LifeCycle, Buffers

HTTP Connector. Implementations of this interface provide connectors for the HTTP protocol. A connector receives requests (normally from a socket) and calls the handle method of the Handler object. These operations are performed using threads from the ThreadPool set on the connector. When a connector is registered with an instance of Server, then the server will set itself as both the ThreadPool and the Handler. Note that a connector can be used without a Server if a thread pool and handler are directly provided.

Author:
gregw

Method Summary
 void close()
           
 void customize(EndPoint endpoint, Request request)
           
 int getConfidentialPort()
           
 String getConfidentialScheme()
           
 int getHeaderBufferSize()
           
 String getHost()
           
 int getIntegralPort()
           
 String getIntegralScheme()
           
 long getMaxIdleTime()
           
 int getPort()
           
 int getRequestBufferSize()
           
 int getResponseBufferSize()
           
 Server getServer()
           
 boolean isConfidential(Request request)
           
 boolean isIntegral(Request request)
           
 Continuation newContinuation()
           
 void open()
           
 void setHeaderBufferSize(int headerBufferSize)
          Set the size of the buffer to be used for request and response headers.
 void setHost(String hostname)
           
 void setMaxIdleTime(long ms)
           
 void setPort(int port)
           
 void setRequestBufferSize(int requestBufferSize)
          Set the size of the content buffer for receiving requests.
 void setResponseBufferSize(int responseBufferSize)
          Set the size of the content buffer for sending responses.
 void setServer(Server server)
           
 
Methods inherited from interface org.mortbay.component.LifeCycle
isFailed, isRunning, isStarted, isStarting, isStopping, start, stop
 
Methods inherited from interface org.mortbay.io.Buffers
getBuffer, returnBuffer
 

Method Detail

open

void open()
          throws IOException
Throws:
IOException

close

void close()
           throws IOException
Throws:
IOException

setServer

void setServer(Server server)

getServer

Server getServer()

getHeaderBufferSize

int getHeaderBufferSize()
Returns:
Returns the headerBufferSize.

setHeaderBufferSize

void setHeaderBufferSize(int headerBufferSize)
Set the size of the buffer to be used for request and response headers. An idle connection will at most have one buffer of this size allocated.

Parameters:
headerBufferSize - The headerBufferSize to set.

getRequestBufferSize

int getRequestBufferSize()
Returns:
Returns the requestBufferSize.

setRequestBufferSize

void setRequestBufferSize(int requestBufferSize)
Set the size of the content buffer for receiving requests. These buffers are only used for active connections that have requests with bodies that will not fit within the header buffer.

Parameters:
requestBufferSize - The requestBufferSize to set.

getResponseBufferSize

int getResponseBufferSize()
Returns:
Returns the responseBufferSize.

setResponseBufferSize

void setResponseBufferSize(int responseBufferSize)
Set the size of the content buffer for sending responses. These buffers are only used for active connections that are sending responses with bodies that will not fit within the header buffer.

Parameters:
responseBufferSize - The responseBufferSize to set.

getIntegralPort

int getIntegralPort()

getIntegralScheme

String getIntegralScheme()

isIntegral

boolean isIntegral(Request request)

getConfidentialPort

int getConfidentialPort()

getConfidentialScheme

String getConfidentialScheme()

isConfidential

boolean isConfidential(Request request)

customize

void customize(EndPoint endpoint,
               Request request)
               throws IOException
Throws:
IOException

newContinuation

Continuation newContinuation()

getHost

String getHost()

setHost

void setHost(String hostname)

getPort

int getPort()

setPort

void setPort(int port)

getMaxIdleTime

long getMaxIdleTime()

setMaxIdleTime

void setMaxIdleTime(long ms)