org.eclipse.jetty.osgi.nested
Class NestedConnectorListener

java.lang.Object
  extended by org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
      extended by org.eclipse.jetty.osgi.nested.NestedConnectorListener
All Implemented Interfaces:
EventListener, LifeCycle.Listener

public class NestedConnectorListener
extends AbstractLifeCycle.AbstractLifeCycleListener

Listens to the start and stop of the NestedConnector to register and unregister the NestedConnector with the BridgeServlet.

All interactions with the BridgeServlet are done via introspection to avoid depending on it directly. The BridgeServlet lives in the bootstrap-webapp; not inside equinox.


Constructor Summary
NestedConnectorListener()
           
 
Method Summary
 String getBridgeServletClassName()
           
 NestedConnector getNestedConnector()
           
 String getRegisterServletDelegateMethodName()
           
 String getUnregisterServletDelegateMethodName()
           
 void lifeCycleStarted(LifeCycle event)
           
 void lifeCycleStopping(LifeCycle event)
           
protected  void registerWithBridgeServlet()
          Hook into the BridgeServlet
 void setBridgeServletClassName(String bridgeServletClassName)
           
 void setNestedConnector(NestedConnector nestedConnector)
           
 void setRegisterServletDelegateMethodName(String registerServletDelegateMethodName)
           
 void setUnregisterServletDelegateMethodName(String unregisterServletDelegateMethodName)
           
protected  void unregisterWithBridgeServlet()
          Unhook into the BridgeServlet
 
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
lifeCycleFailure, lifeCycleStarting, lifeCycleStopped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NestedConnectorListener

public NestedConnectorListener()
Method Detail

setBridgeServletClassName

public void setBridgeServletClassName(String bridgeServletClassName)
Parameters:
bridgeServletClassName - Name of the class that is the BridgeServlet. By default org.eclipse.equinox.servletbridge.BridgeServlet

getBridgeServletClassName

public String getBridgeServletClassName()

getRegisterServletDelegateMethodName

public String getRegisterServletDelegateMethodName()

getUnregisterServletDelegateMethodName

public String getUnregisterServletDelegateMethodName()

setRegisterServletDelegateMethodName

public void setRegisterServletDelegateMethodName(String registerServletDelegateMethodName)
Parameters:
registerServletDelegateMethodName - Name of the static method on the BridgeServlet class to register the servlet delegate.

setUnregisterServletDelegateMethodName

public void setUnregisterServletDelegateMethodName(String unregisterServletDelegateMethodName)
Parameters:
unregisterServletDelegateMethodName - Name of the static method on the BridgeServlet class to unregister the servlet delegate.

setNestedConnector

public void setNestedConnector(NestedConnector nestedConnector)
Parameters:
nestedConnector - The NestedConnector that we are listening to here.

getNestedConnector

public NestedConnector getNestedConnector()
Returns:
The NestedConnector that we are listening to here.

lifeCycleStarted

public void lifeCycleStarted(LifeCycle event)
Specified by:
lifeCycleStarted in interface LifeCycle.Listener
Overrides:
lifeCycleStarted in class AbstractLifeCycle.AbstractLifeCycleListener

lifeCycleStopping

public void lifeCycleStopping(LifeCycle event)
Specified by:
lifeCycleStopping in interface LifeCycle.Listener
Overrides:
lifeCycleStopping in class AbstractLifeCycle.AbstractLifeCycleListener

registerWithBridgeServlet

protected void registerWithBridgeServlet()
                                  throws Exception
Hook into the BridgeServlet

Throws:
Exception

unregisterWithBridgeServlet

protected void unregisterWithBridgeServlet()
                                    throws Exception
Unhook into the BridgeServlet

Throws:
Exception


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