|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.script.SimpleScriptContext
php.java.script.AbstractPhpScriptContext
php.java.script.PhpSimpleHttpScriptContext
public class PhpSimpleHttpScriptContext
A simple ScriptContext which can be used in servlet environments.
| Field Summary |
|---|
| Fields inherited from class php.java.script.AbstractPhpScriptContext |
|---|
APPLICATION_SCOPE, REQUEST_SCOPE, SESSION_SCOPE |
| Fields inherited from interface php.java.bridge.http.IContext |
|---|
ENGINE_SCOPE, GLOBAL_SCOPE, JAVA_BRIDGE, SERVLET, SERVLET_CONFIG, SERVLET_CONTEXT, SERVLET_REQUEST, SERVLET_RESPONSE |
| Fields inherited from interface javax.script.ScriptContext |
|---|
ENGINE_SCOPE, GLOBAL_SCOPE |
| Constructor Summary | |
|---|---|
PhpSimpleHttpScriptContext()
|
|
| Method Summary | |
|---|---|
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 |
java.lang.String |
getContextString()
Return the context string, for example http://localhost:8080/JavaBridge |
java.io.Writer |
getErrorWriter()
Returns the Writer used to display error output. |
java.io.Reader |
getReader()
Returns a Reader to be used by the script to read
input. |
javax.servlet.http.HttpServletRequest |
getRequest()
Get the HttpServletRequest |
javax.servlet.http.HttpServletResponse |
getResponse()
Get the servlet response |
java.lang.String |
getSocketName()
Return the socket name, for example 8080 |
java.io.Writer |
getWriter()
Returns the Writer for scripts to use when displaying output. |
void |
initialize(javax.servlet.Servlet servlet,
javax.servlet.ServletContext ctx,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
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. |
| Methods inherited from class php.java.script.AbstractPhpScriptContext |
|---|
call, getContinuation, setContinuation, setErrorWriter, setWriter |
| Methods inherited from class javax.script.SimpleScriptContext |
|---|
getAttributesScope, getBindings, getScopes, removeAttribute, setBindings, setReader |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface php.java.script.IPhpScriptContext |
|---|
getContinuation, setContinuation, setWriter |
| Methods inherited from interface php.java.bridge.Invocable |
|---|
call |
| Methods inherited from interface php.java.bridge.http.IContext |
|---|
getAttributesScope, removeAttribute |
| Constructor Detail |
|---|
public PhpSimpleHttpScriptContext()
| Method Detail |
|---|
public void initialize(javax.servlet.Servlet servlet,
javax.servlet.ServletContext ctx,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
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 javax.servlet.http.HttpServletResponse getResponse()
public javax.servlet.http.HttpServletRequest getRequest()
public javax.servlet.ServletContext getContext()
public java.lang.String getContextString()
AbstractPhpScriptContext
getContextString in interface IPhpScriptContextgetContextString in class AbstractPhpScriptContextpublic java.lang.String getSocketName()
AbstractPhpScriptContext
getSocketName in interface IPhpScriptContextgetSocketName in class AbstractPhpScriptContextpublic java.io.Writer getWriter()
Writer for scripts to use when displaying output.
getWriter in interface ScriptContextgetWriter in interface IContextgetWriter in interface IPhpScriptContextgetWriter in class AbstractPhpScriptContextWriter.public java.io.Writer getErrorWriter()
Writer used to display error output.
getErrorWriter in interface ScriptContextgetErrorWriter in class AbstractPhpScriptContextWriterpublic java.io.Reader getReader()
ScriptContextReader to be used by the script to read
input.
getReader in interface ScriptContextgetReader in class SimpleScriptContextReader.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||