org.eclipse.jetty.nested
Class NestedConnector

java.lang.Object
  extended by org.eclipse.jetty.util.component.AbstractLifeCycle
      extended by org.eclipse.jetty.http.HttpBuffers
          extended by org.eclipse.jetty.server.AbstractConnector
              extended by org.eclipse.jetty.nested.NestedConnector
All Implemented Interfaces:
Connector, Dumpable, LifeCycle

public class NestedConnector
extends AbstractConnector

Nested Jetty Connector

This Jetty Connector allows a jetty instance to be nested inside another servlet container. Requests received by the outer servlet container should be passed to jetty using the service(ServletRequest, ServletResponse) method of this connector.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
 
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
 
Field Summary
 
Fields inherited from class org.eclipse.jetty.server.AbstractConnector
_lowResourceMaxIdleTime, _maxIdleTime, _soLingerTime
 
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
 
Constructor Summary
NestedConnector()
           
 
Method Summary
protected  void accept(int acceptorID)
           
 void close()
           
 Object getConnection()
           
 int getLocalPort()
           
 void open()
          Opens the connector
 void service(ServletRequest outerRequest, ServletResponse outerResponse)
          Service a request of the outer servlet container by passing it to the nested instance of Jetty.
 
Methods inherited from class org.eclipse.jetty.server.AbstractConnector
checkForwardedHeaders, configure, connectionClosed, connectionOpened, connectionUpgraded, customize, doStart, doStop, dump, dump, getAcceptorPriorityOffset, getAcceptors, getAcceptQueueSize, getConfidentialPort, getConfidentialScheme, getConnections, getConnectionsDurationMax, getConnectionsDurationMean, getConnectionsDurationStdDev, getConnectionsDurationTotal, getConnectionsOpen, getConnectionsOpenMax, getConnectionsRequestsMax, getConnectionsRequestsMean, getConnectionsRequestsStdDev, getForwardedForHeader, getForwardedHostHeader, getForwardedProtoHeader, getForwardedServerHeader, getHost, getHostHeader, getIntegralPort, getIntegralScheme, getLeftMostValue, getLowResourceMaxIdleTime, getLowResourcesMaxIdleTime, getMaxIdleTime, getName, getPort, getRequests, getResolveNames, getReuseAddress, getServer, getSoLingerTime, getStatsOn, getStatsOnMs, getThreadPool, isConfidential, isForwarded, isIntegral, isLowResources, join, persist, setAcceptorPriorityOffset, setAcceptors, setAcceptQueueSize, setConfidentialPort, setConfidentialScheme, setForwarded, setForwardedForHeader, setForwardedHostHeader, setForwardedProtoHeader, setForwardedServerHeader, setHost, setHostHeader, setIntegralPort, setIntegralScheme, setLowResourceMaxIdleTime, setLowResourcesMaxIdleTime, setMaxIdleTime, setName, setPort, setResolveNames, setReuseAddress, setServer, setSoLingerTime, setStatsOn, setThreadPool, statsReset, stopAccept, toString
 
Methods inherited from class org.eclipse.jetty.http.HttpBuffers
getMaxBuffers, getRequestBuffers, getRequestBufferSize, getRequestBufferType, getRequestHeaderSize, getRequestHeaderType, getResponseBuffers, getResponseBufferSize, getResponseBufferType, getResponseHeaderSize, getResponseHeaderType, setMaxBuffers, setRequestBuffers, setRequestBufferSize, setRequestBufferType, setRequestHeaderSize, setRequestHeaderType, setResponseBuffers, setResponseBufferSize, setResponseBufferType, setResponseHeaderSize, setResponseHeaderType
 
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jetty.server.Connector
getRequestBuffers, getRequestBufferSize, getRequestHeaderSize, getResponseBuffers, getResponseBufferSize, getResponseHeaderSize, setRequestBufferSize, setRequestHeaderSize, setResponseBufferSize, setResponseHeaderSize
 
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 

Constructor Detail

NestedConnector

public NestedConnector()
Method Detail

open

public void open()
          throws IOException
Description copied from interface: Connector
Opens the connector

Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

getLocalPort

public int getLocalPort()
Returns:
The actual port the connector is listening on or -1 if it has not been opened, or -2 if it has been closed.

getConnection

public Object getConnection()
Returns:
the underlying socket, channel, buffer etc. for the connector.

accept

protected void accept(int acceptorID)
               throws IOException,
                      InterruptedException
Specified by:
accept in class AbstractConnector
Throws:
IOException
InterruptedException

service

public void service(ServletRequest outerRequest,
                    ServletResponse outerResponse)
             throws IOException,
                    ServletException
Service a request of the outer servlet container by passing it to the nested instance of Jetty.

Parameters:
outerRequest -
outerResponse -
Throws:
IOException
ServletException


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.