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

public class ServletContextFactory
extends SimpleServletContextFactory

Create session contexts for servlets.

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

See Also:
ContextFactory, ContextServer

Method Summary
static IContextFactory addNew(ContextServer server, 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 waitFor(long timeout)
          Wait for the context factory to finish.
 
Methods inherited from class php.java.servlet.SimpleServletContextFactory
createContext, destroy, getSession, getSession, getSimpleSession, throwJavaSessionException
 
Methods inherited from class php.java.bridge.http.SimpleContextFactory
flushBuffer, getBridge, getContext, getId, getSimpleSession, initialize, invalidate, isNew, parseHeader, recycle, recycle, release, releaseManaged, setContext, toString, visit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

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 IContextFactory addNew(ContextServer server,
                                     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