php.java.script
Class PhpScriptContext
java.lang.Object
javax.script.SimpleScriptContext
php.java.script.AbstractPhpScriptContext
php.java.script.PhpScriptContext
- All Implemented Interfaces:
- ScriptContext, IContext, Invocable, IPhpScriptContext
public class PhpScriptContext
- extends AbstractPhpScriptContext
- implements IContext, IPhpScriptContext
This class implements a simple script context for PHP. It starts a standalone
JavaBridgeRunner
which listens for requests from php instances.
In a servlet environment please use a php.java.script.PhpSimpleHttpScriptContext
instead.
- Author:
- jostb
- See Also:
PhpSimpleHttpScriptContext
,
JavaBridgeRunner
Method Summary |
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.lang.String |
getSocketName()
Return the socket name, for example 8080 |
java.io.Writer |
getWriter()
Returns the Writer for scripts to use when displaying output. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PhpScriptContext
public PhpScriptContext()
- Create a standalone PHP script context.
getWriter
public java.io.Writer getWriter()
- Description copied from class:
AbstractPhpScriptContext
- Returns the
Writer
for scripts to use when displaying output.
- Specified by:
getWriter
in interface ScriptContext
- Specified by:
getWriter
in interface IContext
- Specified by:
getWriter
in interface IPhpScriptContext
- Overrides:
getWriter
in class AbstractPhpScriptContext
- Returns:
- The
Writer
.
getErrorWriter
public java.io.Writer getErrorWriter()
- Description copied from class:
AbstractPhpScriptContext
- Returns the
Writer
used to display error output.
- Specified by:
getErrorWriter
in interface ScriptContext
- Overrides:
getErrorWriter
in class AbstractPhpScriptContext
- Returns:
- The
Writer
getSocketName
public java.lang.String getSocketName()
- Description copied from class:
AbstractPhpScriptContext
- Return the socket name, for example 8080
- Specified by:
getSocketName
in interface IPhpScriptContext
- Specified by:
getSocketName
in class AbstractPhpScriptContext
- Returns:
- the socket name
getContextString
public java.lang.String getContextString()
- Description copied from class:
AbstractPhpScriptContext
- Return the context string, for example http://localhost:8080/JavaBridge
- Specified by:
getContextString
in interface IPhpScriptContext
- Specified by:
getContextString
in class AbstractPhpScriptContext
- Returns:
- the context string