|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.script.SimpleScriptContext
php.java.script.PhpSimpleHttpScriptContext
public class PhpSimpleHttpScriptContext
A simple ScriptContext which can be used in servlet environments.
| Field Summary | |
|---|---|
static int |
APPLICATION_SCOPE
Integer value for the level of APPLICATION_SCOPE |
static int |
REQUEST_SCOPE
Integer value for the level of SCRIPT_SCOPE |
static int |
SESSION_SCOPE
Integer value for the level of SESSION_SCOPE |
| Fields inherited from interface javax.script.ScriptContext |
|---|
ENGINE_SCOPE, GLOBAL_SCOPE |
| Constructor Summary | |
|---|---|
PhpSimpleHttpScriptContext()
|
|
| Method Summary | |
|---|---|
boolean |
call(PhpProcedureProxy kont)
Call the java continuation with the current continuation kont as its argument. |
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 key,
int scope)
Retrieves the value associated with specified name in the specified level of scope. |
javax.servlet.ServletContext |
getContext()
Get the ServletContext |
HttpProxy |
getContinuation()
Get the php continuation |
javax.servlet.http.HttpServletRequest |
getRequest()
Get the HttpServletRequest |
javax.servlet.http.HttpServletResponse |
getResponse()
Get the servlet response |
java.io.Writer |
getWriter()
Retrieves an instance of java.io.Writer which can be used by scripts to display their output. |
void |
initialize(javax.servlet.ServletContext ctx,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
PhpScriptWriter writer)
Initialize the context. |
void |
setAttribute(java.lang.String key,
java.lang.Object value,
int scope)
Sets an attribute specified by the name in specified level of scope. |
void |
setContinuation(HttpProxy kont)
Set the php continuation |
void |
setWriter(java.io.Writer writer)
Set the Writer |
| Methods inherited from class javax.script.SimpleScriptContext |
|---|
getAttributesScope, getBindings, removeAttribute, setBindings |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int REQUEST_SCOPE
public static final int SESSION_SCOPE
public static final int APPLICATION_SCOPE
| Constructor Detail |
|---|
public PhpSimpleHttpScriptContext()
| Method Detail |
|---|
public void initialize(javax.servlet.ServletContext ctx,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
PhpScriptWriter writer)
throws javax.servlet.ServletException
ctx - The ServletContextreq - The HttpServletRequestres - The HttpServletResponsewriter - The PhpScriptWriter
javax.servlet.ServletException
public java.lang.Object getAttribute(java.lang.String key,
int scope)
SimpleScriptContext
getAttribute in interface ScriptContextgetAttribute in interface IContextgetAttribute in class SimpleScriptContextkey - the name of the attributescope - the level of scope
public java.lang.Object getAttribute(java.lang.String name)
throws java.lang.IllegalArgumentException
SimpleScriptContext
getAttribute in interface ScriptContextgetAttribute in interface IContextgetAttribute in class SimpleScriptContextname - the name of the attribute
java.lang.IllegalArgumentException - if the name is null
public void setAttribute(java.lang.String key,
java.lang.Object value,
int scope)
throws java.lang.IllegalArgumentException
SimpleScriptContext
setAttribute in interface ScriptContextsetAttribute in interface IContextsetAttribute in class SimpleScriptContextkey - the name of the attributevalue - the value of the attributescope - the level of the scope
java.lang.IllegalArgumentException - if the name is null or the
scope is invalidpublic java.io.Writer getWriter()
SimpleScriptContext
getWriter in interface ScriptContextgetWriter in interface IContextgetWriter in interface IPhpScriptContextgetWriter in class SimpleScriptContextpublic javax.servlet.http.HttpServletResponse getResponse()
public javax.servlet.http.HttpServletRequest getRequest()
public javax.servlet.ServletContext getContext()
public void setContinuation(HttpProxy kont)
IPhpScriptContext
setContinuation in interface IPhpScriptContextkont - The continuation.
public boolean call(PhpProcedureProxy kont)
throws java.lang.Exception
Invocablekont as its argument.
call in interface Invocablekont - The continuation.
java.lang.Exceptionpublic void setWriter(java.io.Writer writer)
IPhpScriptContext
setWriter in interface IPhpScriptContextwriter - The writerpublic HttpProxy getContinuation()
IPhpScriptContext
getContinuation in interface IPhpScriptContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||