net.officefloor.plugin.servlet.bridge
Class ServletBridgeManagedObjectSource

java.lang.Object
  extended by net.officefloor.frame.spi.managedobject.source.impl.AbstractAsyncManagedObjectSource<D,F>
      extended by net.officefloor.frame.spi.managedobject.source.impl.AbstractManagedObjectSource<None,ServletBridgeManagedObjectSource.FlowKeys>
          extended by net.officefloor.plugin.servlet.bridge.ServletBridgeManagedObjectSource
All Implemented Interfaces:
ManagedObjectSource<None,ServletBridgeManagedObjectSource.FlowKeys>

public class ServletBridgeManagedObjectSource
extends AbstractManagedObjectSource<None,ServletBridgeManagedObjectSource.FlowKeys>

ManagedObjectSource to trigger a ProcessState to service a HttpServletRequest via providing a ServletBridge.

Author:
Daniel Sagenschneider

Nested Class Summary
static class ServletBridgeManagedObjectSource.FlowKeys
          Flow keys for the ServletBridgeManagedObjectSource.
 
Nested classes/interfaces inherited from class net.officefloor.frame.spi.managedobject.source.impl.AbstractAsyncManagedObjectSource
AbstractAsyncManagedObjectSource.DependencyLabeller, AbstractAsyncManagedObjectSource.Labeller, AbstractAsyncManagedObjectSource.MetaDataContext<D extends Enum<D>,F extends Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext
 
Field Summary
static String[] DEPENDENCY_ANNOTATION_TYPE_NAMES
          Type names for the dependency annotations.
static String PROPERTY_INSTANCE_IDENTIFIER
          Name of property identifying the instance of the Servlet.
 
Constructor Summary
ServletBridgeManagedObjectSource()
           
 
Method Summary
static
<S> ServletServiceBridger<S>
createServletServiceBridger(Class<S> servletClass)
          Creates the ServletServiceBridger for the Servlet.
static
<S> ServletServiceBridger<S>
createServletServiceBridger(Class<S> servletClass, AutoWireOfficeFloorSource source, String handlerSectionName, String handlerInputName)
          Convenience method to create a ServletServiceBridger and also configure into the AutoWireOfficeFloorSource.
protected  ManagedObject getManagedObject()
           
protected  void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None,ServletBridgeManagedObjectSource.FlowKeys> context)
           
protected  void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
           
 void start(ManagedObjectExecuteContext<ServletBridgeManagedObjectSource.FlowKeys> context)
           
 
Methods inherited from class net.officefloor.frame.spi.managedobject.source.impl.AbstractManagedObjectSource
sourceManagedObject
 
Methods inherited from class net.officefloor.frame.spi.managedobject.source.impl.AbstractAsyncManagedObjectSource
getMetaData, getSpecification, init, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEPENDENCY_ANNOTATION_TYPE_NAMES

public static final String[] DEPENDENCY_ANNOTATION_TYPE_NAMES
Type names for the dependency annotations. Using the qualified name rather than the class name as some dependencies such as EJBs may not have the annotation class available within the class path.


PROPERTY_INSTANCE_IDENTIFIER

public static final String PROPERTY_INSTANCE_IDENTIFIER
Name of property identifying the instance of the Servlet.

See Also:
Constant Field Values
Constructor Detail

ServletBridgeManagedObjectSource

public ServletBridgeManagedObjectSource()
Method Detail

createServletServiceBridger

public static <S> ServletServiceBridger<S> createServletServiceBridger(Class<S> servletClass,
                                                                       AutoWireOfficeFloorSource source,
                                                                       String handlerSectionName,
                                                                       String handlerInputName)
Convenience method to create a ServletServiceBridger and also configure into the AutoWireOfficeFloorSource.

Parameters:
servletClass - Servlet class.
source - AutoWireOfficeFloorSource.
handlerSectionName - Name of the section to handle the HTTP request.
handlerInputName - Name of the input on the section to handle the HTTP request.
Returns:
ServletServiceBridger.

createServletServiceBridger

public static <S> ServletServiceBridger<S> createServletServiceBridger(Class<S> servletClass)
Creates the ServletServiceBridger for the Servlet.

Parameters:
servletClass - Class of the Servlet.
Returns:
ServletServiceBridger for the Servlet.

loadSpecification

protected void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Specified by:
loadSpecification in class AbstractAsyncManagedObjectSource<None,ServletBridgeManagedObjectSource.FlowKeys>

loadMetaData

protected void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None,ServletBridgeManagedObjectSource.FlowKeys> context)
                     throws Exception
Specified by:
loadMetaData in class AbstractAsyncManagedObjectSource<None,ServletBridgeManagedObjectSource.FlowKeys>
Throws:
Exception

start

public void start(ManagedObjectExecuteContext<ServletBridgeManagedObjectSource.FlowKeys> context)
           throws Exception
Specified by:
start in interface ManagedObjectSource<None,ServletBridgeManagedObjectSource.FlowKeys>
Overrides:
start in class AbstractAsyncManagedObjectSource<None,ServletBridgeManagedObjectSource.FlowKeys>
Throws:
Exception

getManagedObject

protected ManagedObject getManagedObject()
                                  throws Throwable
Specified by:
getManagedObject in class AbstractManagedObjectSource<None,ServletBridgeManagedObjectSource.FlowKeys>
Throws:
Throwable


Copyright © 2005-2012. All Rights Reserved.