org.glassfish.osgihttp
Class OSGiHttpContextValve

java.lang.Object
  extended by org.apache.catalina.valves.ValveBase
      extended by org.glassfish.osgihttp.OSGiHttpContextValve
All Implemented Interfaces:
MBeanRegistration, org.apache.catalina.Contained, org.apache.catalina.Lifecycle, org.apache.catalina.Valve, org.glassfish.web.valve.GlassFishValve

public class OSGiHttpContextValve
extends org.apache.catalina.valves.ValveBase

Since OSGi/HTTP service spec does not a notion of a unique path per http context, we register all the OSGi servlets with the same Context object. We still need to demultiplex the OSGi servlet context which is separate for each HttpContext. This valve helps in demultiplexing. It performs following tasks: a) Sets the current WebModule in InvocationContext b) Sets the current WebModule as the Context of the Request object. c) Reset unsuccessfulSessionFind flag in Request object.

See GLASSFISH-16764 for more details.

Author:
Sanjeeb.Sahoo@Oracle.COM

Field Summary
 
Fields inherited from class org.apache.catalina.valves.ValveBase
container, controller, debug, domain, info, lifecycle, mserver, next, oname, sm, started
 
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT
 
Fields inherited from interface org.glassfish.web.valve.GlassFishValve
END_PIPELINE, INVOKE_NEXT
 
Constructor Summary
OSGiHttpContextValve()
           
 
Method Summary
 int invoke(org.apache.catalina.Request request, org.apache.catalina.Response response)
           
 
Methods inherited from class org.apache.catalina.valves.ValveBase
addLifecycleListener, backgroundProcess, createObjectName, event, findLifecycleListeners, getContainer, getContainerName, getController, getDebug, getDomain, getInfo, getNext, getObjectName, getParentName, invoke, isStarted, postDeregister, postInvoke, postRegister, preDeregister, preRegister, removeLifecycleListener, setContainer, setController, setDebug, setNext, setObjectName, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSGiHttpContextValve

public OSGiHttpContextValve()
Method Detail

invoke

public int invoke(org.apache.catalina.Request request,
                  org.apache.catalina.Response response)
           throws IOException,
                  javax.servlet.ServletException
Specified by:
invoke in interface org.glassfish.web.valve.GlassFishValve
Specified by:
invoke in class org.apache.catalina.valves.ValveBase
Throws:
IOException
javax.servlet.ServletException


Copyright © 2012 GlassFish Community. All Rights Reserved.