public class ServletWebAutoWireApplication<S extends OfficeFloorServlet> extends WebApplicationAutoWireOfficeFloorSource implements WebAutoWireApplication
Servlet
WebAutoWireApplication
.AbstractOfficeFloorSource.SpecificationContext
processScopeWirer
HANDLER_INPUT_NAME, HANDLER_SECTION_NAME, WEB_PUBLIC_RESOURCES_CLASS_PATH_PREFIX
Modifier and Type | Method and Description |
---|---|
static void |
configure(OfficeFloorServlet servletInitiateInstance,
javax.servlet.ServletContext servletContext)
Configures the
OfficeFloorServlet implementation into the
ServletContext . |
void |
destroy()
Destroys this
ServletWebAutoWireApplication . |
static <I extends OfficeFloorServlet> |
initiate(I servletInstance)
Initiates and returns the
ServletWebAutoWireApplication for the
OfficeFloorServlet instance. |
void |
linkEscalation(Class<? extends Throwable> escalation,
String resourcePath)
Links the
Escalation to be handled by the resource. |
void |
linkToResource(AutoWireSection section,
String outputName,
String requestDispatcherPath)
Links to a resource.
|
static void |
reset()
Resets the registered
ServletWebAutoWireApplication instances. |
boolean |
service(S servletInstance,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Services the
HttpServletRequest . |
addHttpApplicationObject, addHttpApplicationObject, addHttpRequestObject, addHttpRequestObject, addHttpSessionObject, addHttpSessionObject, addHttpTemplate, chainServicer, getHttpSecurity, getTemplateSectionName, getURIs, initOfficeFloor, linkEscalation, linkToHttpTemplate, linkToSendResponse, linkUri, setDefaultHttpTemplateUriSuffix, setHttpSecurity
addGovernance, addManagedObject, addObject, addSection, addSection, addSectionTransformer, addStartupFlow, addSupplier, assignDefaultTeam, assignTeam, getAppropriateAutoWire, getOfficeFloorCompiler, getSection, isLinked, isObjectAvailable, link, linkEscalation, loadSpecification, openOfficeFloor, setProfiler, sourceOfficeFloor, specifyConfigurationProperties
getSpecification
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addHttpApplicationObject, addHttpApplicationObject, addHttpRequestObject, addHttpRequestObject, addHttpSessionObject, addHttpSessionObject, addHttpTemplate, chainServicer, getHttpSecurity, getURIs, linkEscalation, linkToHttpTemplate, linkToSendResponse, linkUri, setDefaultHttpTemplateUriSuffix, setHttpSecurity
addGovernance, addManagedObject, addObject, addSection, addSection, addSectionTransformer, addStartupFlow, addSupplier, assignDefaultTeam, assignTeam, getOfficeFloorCompiler, getSection, isLinked, isObjectAvailable, link, linkEscalation, openOfficeFloor, setProfiler
public static void reset()
Resets the registered ServletWebAutoWireApplication
instances.
This should NOT be called in Production and is only to reset for testing.
public static void configure(OfficeFloorServlet servletInitiateInstance, javax.servlet.ServletContext servletContext)
Configures the OfficeFloorServlet
implementation into the
ServletContext
.
This is expected to be called from a ServletContextListener
as it
will configure an instance of the OfficeFloorServlet
with
appropriate URI mapping.
servletInitiateInstance
- Implementing instance of the OfficeFloorServlet
. This
instance is only used used for registration and configuration.
Its Class
however is registered so that a new instance
is instantiated and allows injection of necessary resources to
occur.servletContext
- ServletContext
.public static <I extends OfficeFloorServlet> ServletWebAutoWireApplication<I> initiate(I servletInstance) throws javax.servlet.ServletException
Initiates and returns the ServletWebAutoWireApplication
for the
OfficeFloorServlet
instance.
This is expected to be called from the
Servlet.init(ServletConfig)
so that the
ServletConfig.getInitParameter(String)
is available.
I
- OfficeFloorServlet
type.servletInstance
- OfficeFloorServlet
instance.ServletWebAutoWireApplication
for the
OfficeFloorServlet
instance after it has been initiated.javax.servlet.ServletException
- If fails to initiate.public boolean service(S servletInstance, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
HttpServletRequest
.servletInstance
- OfficeFloorServlet
instance.request
- HttpServletRequest
.response
- HttpServletResponse
.true
if serviced or false
indicating
not handled.javax.servlet.ServletException
- If fails to service HttpServletRequest
.IOException
- If I/O failure in servicing the HttpServletRequest
.public void destroy()
ServletWebAutoWireApplication
.public void linkToResource(AutoWireSection section, String outputName, String requestDispatcherPath)
WebAutoWireApplication
Links to a resource.
The meaning of resource path is specific to implementation.
linkToResource
in interface WebAutoWireApplication
linkToResource
in class WebApplicationAutoWireOfficeFloorSource
section
- AutoWireSection
.outputName
- Name of the OfficeSectionOutput
.requestDispatcherPath
- Resource path.public void linkEscalation(Class<? extends Throwable> escalation, String resourcePath)
WebAutoWireApplication
Escalation
to be handled by the resource.linkEscalation
in interface WebAutoWireApplication
linkEscalation
in class WebApplicationAutoWireOfficeFloorSource
escalation
- Escalation
.resourcePath
- Resource path.Copyright © 2005–2016. All rights reserved.