php.java.servlet
Class ServletContextFactory

java.lang.Object
  extended by php.java.bridge.http.SimpleContextFactory
      extended by php.java.servlet.SimpleServletContextFactory
          extended by php.java.servlet.ServletContextFactory
All Implemented Interfaces:
IContextFactory, IContextFactoryVisitor, IJavaBridgeFactory
Direct Known Subclasses:
PhpServletContextFactory

public class ServletContextFactory
extends SimpleServletContextFactory

Create session contexts for servlets.

In addition to the standard ContextFactory this manager keeps a reference to the HttpServletRequest.

See Also:
ContextFactory, ContextServer

Method Summary
static ServletContextFactory addNew(javax.servlet.Servlet servlet, javax.servlet.ServletContext kontext, javax.servlet.http.HttpServletRequest proxy, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Create and add a new ContextFactory.
 void releaseManaged()
          Wait for the context factory to finish, then release
 void waitFor(long timeout)
          Wait for the context factory to finish.
 
Methods inherited from class php.java.servlet.SimpleServletContextFactory
createContext, destroy, getSession, getSession, toString
 
Methods inherited from class php.java.bridge.http.SimpleContextFactory
getBridge, getClassLoader, getContext, getId, getJavaBridgeClassLoader, getSession, initialize, invalidate, isNew, recycle, recycle, release, setClassLoader, setContext, visit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

releaseManaged

public void releaseManaged()
                    throws java.lang.InterruptedException
Wait for the context factory to finish, then release

Specified by:
releaseManaged in interface IContextFactory
Overrides:
releaseManaged in class SimpleContextFactory
Throws:
java.lang.InterruptedException
See Also:
ContextRunner

waitFor

public void waitFor(long timeout)
             throws java.lang.InterruptedException
Wait for the context factory to finish.

Specified by:
waitFor in interface IContextFactory
Overrides:
waitFor in class SimpleContextFactory
Parameters:
timeout - The timeout
Throws:
java.lang.InterruptedException
See Also:
ContextRunner

addNew

public static ServletContextFactory addNew(javax.servlet.Servlet servlet,
                                           javax.servlet.ServletContext kontext,
                                           javax.servlet.http.HttpServletRequest proxy,
                                           javax.servlet.http.HttpServletRequest req,
                                           javax.servlet.http.HttpServletResponse res)
Create and add a new ContextFactory.

Parameters:
servlet - The servlet
kontext - The servlet context
proxy - The proxied request
req - The HttpServletRequest
res - The HttpServletResponse
Returns:
The created ContextFactory