pnuts.ext
Class PnutsClient
java.lang.Object
|
+--pnuts.ext.PnutsClient
- public final class PnutsClient
- extends java.lang.Object
This class is a sample implementation of a secure script environment based on
jdk1.2 security. The security policy is almost same as that of a Java Applet.
The JAR files which include this class should be located in $JRE/lib/ext/.
e.g.
% java -Djava.security.manager pnuts.ext.PnutsClient http://host/xxx/script.pnut
"script.pnut" is executed as safely as Java applets.
- See Also:
IPnutsProxy
,
PnutsProxy
Method Summary |
java.lang.Object |
eval(java.lang.String expr)
|
java.lang.Object |
eval(java.lang.String expr,
Context context)
|
java.lang.Object |
load(java.io.InputStream in)
load a script from InputStream "in" |
java.lang.Object |
load(java.io.InputStream in,
Context context)
load a script from InputStream "in" in "context" |
java.lang.Object |
load(java.io.Reader in)
|
java.lang.Object |
load(java.io.Reader in,
Context context)
|
static java.lang.Object |
load(java.net.URL url)
Executes a script at the specified URL |
static java.lang.Object |
load(java.net.URL url,
Context context)
Executes a script at the specified URL |
static void |
main(java.lang.String[] a)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
PnutsClient
protected PnutsClient()
PnutsClient
public PnutsClient(java.net.URL codebase)
- Creates a PnutsClient object.
- Parameters:
codebase
- the codebase of scripts
load
public static java.lang.Object load(java.net.URL url)
throws java.io.IOException
- Executes a script at the specified URL
- Parameters:
url
- the URL
load
public static java.lang.Object load(java.net.URL url,
Context context)
throws java.io.IOException
- Executes a script at the specified URL
- Parameters:
url
- the URLcontext
- the Context
load
public java.lang.Object load(java.io.InputStream in)
- load a script from InputStream "in"
- See Also:
Pnuts.load(InputStream)
load
public java.lang.Object load(java.io.InputStream in,
Context context)
- load a script from InputStream "in" in "context"
- See Also:
Pnuts.load(InputStream, pnuts.lang.Context)
load
public java.lang.Object load(java.io.Reader in)
- See Also:
Pnuts.load(Reader)
load
public java.lang.Object load(java.io.Reader in,
Context context)
- See Also:
Pnuts.load(Reader, pnuts.lang.Context)
eval
public java.lang.Object eval(java.lang.String expr)
- See Also:
Pnuts.eval(String)
eval
public java.lang.Object eval(java.lang.String expr,
Context context)
- See Also:
Pnuts.eval(String, pnuts.lang.Context)
main
public static void main(java.lang.String[] a)
throws java.lang.Throwable