php.java.script.servlet
Class InvocableRemotePhpServletContextFactory

java.lang.Object
  extended by php.java.bridge.http.SimpleContextFactory
      extended by php.java.servlet.SimpleServletContextFactory
          extended by php.java.script.servlet.InvocablePhpServletContextFactory
              extended by php.java.script.servlet.InvocableRemotePhpServletContextFactory
All Implemented Interfaces:
IContextFactory, IContextFactoryVisitor, IJavaBridgeFactory

public class InvocableRemotePhpServletContextFactory
extends InvocablePhpServletContextFactory

A custom context factory, creates a ContextFactory for JSR223 contexts. This context factory waits for the script continuation. Use the PhpServletContextFactory if you don't want to call php methods from Java.

Author:
jostb
See Also:
SimpleContextFactory.initialize(), SimpleContextFactory.releaseManaged(), PhpServletContextFactory

Method Summary
static IContextFactory addNew(IContext context, javax.servlet.Servlet servlet, javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String localName)
          Add the PhpScriptContext
 java.lang.String getRedirectString(java.lang.String webPath)
          Return the redirect string, for example h:localhost:8080/webPath
 
Methods inherited from class php.java.script.servlet.InvocablePhpServletContextFactory
addNew
 
Methods inherited from class php.java.servlet.SimpleServletContextFactory
createContext, destroy, getRedirectString, getSession, getSession, getSocketName
 
Methods inherited from class php.java.bridge.http.SimpleContextFactory
getBridge, getClassLoader, getContext, getId, getJavaBridgeClassLoader, getSession, initialize, invalidate, isNew, recycle, recycle, release, releaseManaged, setClassLoader, setContext, toString, visit, waitFor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addNew

public static IContextFactory addNew(IContext context,
                                     javax.servlet.Servlet servlet,
                                     javax.servlet.ServletContext ctx,
                                     javax.servlet.http.HttpServletRequest req,
                                     javax.servlet.http.HttpServletResponse res,
                                     java.lang.String localName)
Add the PhpScriptContext

Parameters:
context - The passed context
servlet - The servlet
ctx - The servlet context
req - The servlet request
res - The servlet response
localName - The official server name or IP# from the remote script engine's point of view. There must not be an IP based load balancer in between.
Returns:
The ContextFactory.

getRedirectString

public java.lang.String getRedirectString(java.lang.String webPath)
Return the redirect string, for example h:localhost:8080/webPath

Specified by:
getRedirectString in interface IContextFactory
Overrides:
getRedirectString in class SimpleServletContextFactory
Parameters:
webPath - Usually request.getContextPath()+request.getServletPath()
Returns:
the redirect string