| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IContext
Interface which all contexts must implement. Used when the JSR223 interface is not available.
| Field Summary | |
|---|---|
| static int | ENGINE_SCOPEThe engine scope | 
| static int | GLOBAL_SCOPEThe global scope | 
| static java.lang.String | JAVA_BRIDGEThis key can be used to get the current JavaBridge instance. | 
| static java.lang.String | PHP_PROCEDUREThis key can be used to get the current continuation. | 
| static java.lang.String | SERVLETThis key can be used to get the current Servlet instance. | 
| static java.lang.String | SERVLET_CONFIGThis key can be used to get the current ServletConfig instance. | 
| static java.lang.String | SERVLET_CONTEXTThis key can be used to get the current ServletContext instance. | 
| static java.lang.String | SERVLET_REQUESTThis key can be used to get the current HttpServletRequest instance. | 
| static java.lang.String | SERVLET_RESPONSEThis key can be used to get the current HttpServletResponse instance. | 
| Method Summary | |
|---|---|
|  java.lang.Object | get(java.lang.String key)Get a binding from the engine scope | 
|  java.util.Map | getAll()Get all bindings from the engine scope | 
|  java.lang.Object | getAttribute(java.lang.String name)Retrieves the value for getAttribute(String, int) for the lowest scope in which it returns a non-null value. | 
|  java.lang.Object | getAttribute(java.lang.String name,
             int scope)Retrieves the value associated with specified name in the specified level of scope. | 
|  int | getAttributesScope(java.lang.String name)Retrieves the lowest value of scopes for which the attribute is defined. | 
|  java.lang.Object | getHttpServletRequest()Return the http servlet request | 
|  java.lang.Object | getHttpServletResponse()Return the http servlet response | 
|  java.lang.String | getRealPath(java.lang.String path)Get the full file system path for the given resource. | 
|  java.lang.String | getRedirectString()Deprecated. Use getRedirectURL(String) | 
|  java.lang.String | getRedirectString(java.lang.String webPath)Deprecated. Use getRedirectURL(String) | 
|  java.lang.String | getRedirectURL(java.lang.String webPath)Return the redirect string, for example http://localhost:8080/webPath Used by the non-compiling script engines to hard-code the back-end URL in the Java.inc | 
|  java.lang.Object | getServlet()Return the http servlet | 
|  java.lang.Object | getServletConfig()Return the servlet config | 
|  java.lang.Object | getServletContext()Return the servlet context | 
|  java.lang.String | getSocketName()Return the socket name, for example 8080 | 
|  java.io.Writer | getWriter()Retrieves an instance of java.io.Writer which can be used by scripts to display their output. | 
|  void | put(java.lang.String key,
    java.lang.Object val)Add a new binding to the engine scope | 
|  void | putAll(java.util.Map map)Put all bindings to the engine scope | 
|  void | remove(java.lang.String key)Remove a bindings from the engine scope | 
|  java.lang.Object | removeAttribute(java.lang.String name,
                int scope)Removes the specified attribute form the specified level of scope. | 
|  void | setAttribute(java.lang.String name,
             java.lang.Object value,
             int scope)Sets an attribute specified by the name in specified level of scope. | 
| Field Detail | 
|---|
static final int ENGINE_SCOPE
static final int GLOBAL_SCOPE
static final java.lang.String PHP_PROCEDURE
java_context->getAttribute("php.java.bridge.PhpProcedure");
static final java.lang.String JAVA_BRIDGE
java_context->getAttribute("php.java.bridge.JavaBridge");
static final java.lang.String SERVLET_CONTEXT
java_context->getAttribute("php.java.servlet.ServletContext");
static final java.lang.String SERVLET_CONFIG
java_context->getAttribute("php.java.servlet.ServletConfig");
static final java.lang.String SERVLET
java_context->getAttribute("php.java.servlet.Servlet");
static final java.lang.String SERVLET_REQUEST
java_context->getAttribute("php.java.servlet.HttpServletRequest");
static final java.lang.String SERVLET_RESPONSE
java_context->getAttribute("php.java.servlet.HttpServletResponse");
| Method Detail | 
|---|
java.lang.Object getAttribute(java.lang.String name)
                              throws java.lang.IllegalArgumentException
name - the name of the attribute
java.lang.IllegalArgumentException
java.lang.Object getAttribute(java.lang.String name,
                              int scope)
                              throws java.lang.IllegalArgumentException
name - the name of the attributescope - the level of scope
java.lang.IllegalArgumentExceptionint getAttributesScope(java.lang.String name)
name - the name of attribute
java.io.Writer getWriter()
                         throws java.io.IOException
java.io.IOException
java.lang.Object removeAttribute(java.lang.String name,
                                 int scope)
                                 throws java.lang.IllegalArgumentException
name - the name of the attributescope - the level of scope
java.lang.IllegalArgumentException
void setAttribute(java.lang.String name,
                  java.lang.Object value,
                  int scope)
                  throws java.lang.IllegalArgumentException
name - the name of the attributevalue - the value of the attributescope - the level of the scope
java.lang.IllegalArgumentException - if the name is null scope is
         invlaidjava.lang.Object getHttpServletResponse()
java.lang.Object getHttpServletRequest()
java.lang.Object getServlet()
java.lang.Object getServletConfig()
java.lang.Object getServletContext()
java.lang.String getRealPath(java.lang.String path)
path - the relative path to an existing resource
void put(java.lang.String key,
         java.lang.Object val)
key - the keyval - the valuejava.lang.Object get(java.lang.String key)
key - the key
void remove(java.lang.String key)
key - the keyvoid putAll(java.util.Map map)
map - the mapjava.util.Map getAll()
java.lang.String getRedirectURL(java.lang.String webPath)
webPath - Usually request.getContextPath()+request.getServletPath()
java.lang.String getRedirectString(java.lang.String webPath)
getRedirectURL(String)
java.lang.String getRedirectString()
getRedirectURL(String)
java.lang.String getSocketName()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||