|
S-PLUS Connect/Java v1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.insightful.splus.SplusSessionImpl
Basic implementation of SplusSession for UNIX/Linux. Communicates with the S-PLUS engine via FIFO's.
Field Summary |
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
SplusSessionImpl()
|
|
SplusSessionImpl(String[] args)
|
|
SplusSessionImpl(String[] args,
boolean doSSL)
|
Method Summary | |
static void |
clientShutdown()
|
SplusDataResult |
evalDataQuery(String cmd)
Evaluate an S-PLUS expression in the S-PLUS engine and retrieve the result as an SplusDataResult. |
SplusDataResult |
evalDataQuery(String cmd,
boolean pingEngine,
boolean parseTest)
Evaluate an S-PLUS expression in the S-PLUS engine and retrieve the result as an SplusDataResult. |
SplusDataResult |
evalDataQuery(String cmd,
boolean Output,
boolean Result,
boolean Errors,
boolean Warnings,
boolean Expr)
Evaluate an S-PLUS expression in the S-PLUS engine and retrieve the result as an SplusDataResult. |
SplusDataResult |
evalDataQuery(String cmd,
boolean Output,
boolean Result,
boolean Errors,
boolean Warnings,
boolean Expr,
boolean pingEngine,
boolean parseTest)
Evaluate an S-PLUS expression in the S-PLUS engine and retrieve the result as an SplusDataResult. |
SplusDataResult |
evalDataQuery(String cmd,
boolean Output,
boolean Result,
boolean Errors,
boolean Warnings,
boolean Expr,
int timeout)
Evaluate an S-PLUS expression in the S-PLUS engine and retrieve the result as an SplusDataResult. |
SplusDataResult |
evalDataQuery(String cmd,
boolean Output,
boolean Result,
boolean Errors,
boolean Warnings,
boolean Expr,
int timeout,
boolean pingEngine,
boolean parseTest)
Evaluate an S-PLUS expression in the S-PLUS engine and retrieve the result as an SplusDataResult. |
SplusDataResult |
evalDataQuery(String cmd,
int timeout)
Evaluate an S-PLUS expression in the S-PLUS engine and retrieve the result as an SplusDataResult. |
SplusDataResult |
evalDataQuery(String cmd,
int timeout,
boolean pingEngine,
boolean parseTest)
Evaluate an S-PLUS expression in the S-PLUS engine and retrieve the result as an SplusDataResult. |
protected void |
finalize()
|
char[] |
getCertAccess()
Method allowing clients to get the password to a certificate file on the server. |
String |
getCertFilename()
Method allowing clients to get a path to a certificate file on the server. |
static ClientObjectFactory |
getClientObjectFactory()
|
ClientUtilities |
getClientUtilities()
Create and return a new server-side ClientUtilitiesImpl. |
FileInputStreamProxy |
getFileInputStream(String filename)
Get a FileInputStream from the server JVM. |
FileOutputStreamProxy |
getFileOutputStream(String filename)
Get a FileOutputStream from the server JVM. |
static SplusSession |
getRemoteSession(boolean useDialog,
ClientObjectFactory objFact,
String[] clArgs)
Login to a remote session object. |
void |
init(String[] args)
|
void |
Interrupt()
Send an interrupt signal (SIGINT) to the S-PLUS engine. |
boolean |
isRemote()
Test whether the session is remote. |
protected static SplusSession |
loginWithSystemProperties(String[] clArgs)
If system properties are set with the login information, use that information to log in. |
void |
pollOutput(SplusOutputHandler handler)
|
String |
readSplusErr()
Read any pending standard error text from the S-PLUS engine. |
String |
readSplusOut()
Read any pending standard output from the S-PLUS engine. |
void |
sessionExit()
Shut down the session. |
void |
sessionExit(boolean killClient)
Shut down the session. |
void |
setClientObjectFactory(ClientObjectFactory factory)
Set a ClientObjectFactory that the server can use to perform operations in the client JVM. |
void |
startPollOutput(SplusOutputHandler handler)
Register an SplusOutputHandler to be notified when output is available. |
void |
writeSplusData(String str)
Write text to the data channel. |
void |
writeSplusIn(String str)
Write text to the S-PLUS engine's standard input. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SplusSessionImpl(String[] args, boolean doSSL) throws RemoteException
public SplusSessionImpl(String[] args) throws RemoteException
public SplusSessionImpl() throws RemoteException
Method Detail |
public void init(String[] args) throws RemoteException
RemoteException
public void writeSplusIn(String str) throws RemoteException
SplusSession
writeSplusIn
in interface SplusSession
RemoteException
public void writeSplusData(String str) throws RemoteException
SplusSession
writeSplusData
in interface SplusSession
RemoteException
public String readSplusOut() throws RemoteException
SplusSession
readSplusOut
in interface SplusSession
RemoteException
public String readSplusErr() throws RemoteException
SplusSession
readSplusErr
in interface SplusSession
RemoteException
public SplusDataResult evalDataQuery(String cmd, boolean Output, boolean Result, boolean Errors, boolean Warnings, boolean Expr, int timeout, boolean pingEngine, boolean parseTest) throws RemoteException, SplusEngineBusyException, SplusIncompleteExpressionException
SplusSession
This version of the method has boolean flags to indicate which elements to include in the SplusDataResult. Set specific flags to false to avoid shipping over unnecessary information.
Additional flags are available to defeat the checking for engine availability and command completeness. This is generally unsafe. If, however, one is certain that the command is correct and the engine is not busy with a previous command or with requests from some other thread, it will speed up the method call by about 150 ms.
evalDataQuery
in interface SplusSession
cmd
- Expression to evaluate.Output
- Include output in the SplusDataResult.Result
- Include data in the SplusDataResult.Errors
- Include errors in the SplusDataResult.Warnings
- Include warnings in the SplusDataResult.Expr
- Include the expression (cmd) reformatted to match the
width of the output.timeout
- Seconds to wait before generating an Engine Busy error.pingEngine
- Perform a check to see if the S-PLUS engine is
responsive.parseTest
- Perform a check to see if the command parses before
attempting to evaluate it.
RemoteException
SplusEngineBusyException
SplusIncompleteExpressionException
public SplusDataResult evalDataQuery(String cmd) throws RemoteException, SplusEngineBusyException, SplusIncompleteExpressionException
SplusSession
evalDataQuery
in interface SplusSession
cmd
- Expression to evaluate.
RemoteException
SplusEngineBusyException
SplusIncompleteExpressionException
public SplusDataResult evalDataQuery(String cmd, int timeout) throws RemoteException, SplusEngineBusyException, SplusIncompleteExpressionException
SplusSession
evalDataQuery
in interface SplusSession
cmd
- Expression to evaluate.timeout
- Seconds to wait before generating an Engine Busy error.
RemoteException
SplusEngineBusyException
SplusIncompleteExpressionException
public SplusDataResult evalDataQuery(String cmd, boolean pingEngine, boolean parseTest) throws RemoteException, SplusEngineBusyException, SplusIncompleteExpressionException
SplusSession
Additional flags are available to avert the checking for engine availability and command completeness. This is generally unsafe. If, however, one is certain that the command is correct and the engine is not busy with a previous command or with requests from some other thread, it will speed up the method call by about 150 ms.
evalDataQuery
in interface SplusSession
cmd
- Expression to evaluate.pingEngine
- Perform a check to see if the S-PLUS engine is
responsive.parseTest
- Perform a check to see if the command parses before
attempting to evaluate it.
RemoteException
SplusEngineBusyException
SplusIncompleteExpressionException
public SplusDataResult evalDataQuery(String cmd, int timeout, boolean pingEngine, boolean parseTest) throws RemoteException, SplusEngineBusyException, SplusIncompleteExpressionException
SplusSession
Additional flags are available to avert the checking for engine availability and command completeness. This is generally unsafe. If, however, one is certain that the command is correct and the engine is not busy with a previous command or with requests from some other thread, it will speed up the method call by about 150 ms.
evalDataQuery
in interface SplusSession
cmd
- Expression to evaluate.timeout
- Seconds to wait before generating an Engine Busy error.pingEngine
- Perform a check to see if the S-PLUS engine is
responsive.parseTest
- Perform a check to see if the command parses before
attempting to evaluate it.
RemoteException
SplusEngineBusyException
SplusIncompleteExpressionException
public SplusDataResult evalDataQuery(String cmd, boolean Output, boolean Result, boolean Errors, boolean Warnings, boolean Expr) throws RemoteException, SplusEngineBusyException, SplusIncompleteExpressionException
SplusSession
This version of the method has boolean flags to indicate which elements to include in the SplusDataResult. Set specific flags to false to avoid shipping over unnecessary information.
evalDataQuery
in interface SplusSession
cmd
- Expression to evaluate.Output
- Include output in the SplusDataResult.Result
- Include data in the SplusDataResult.Errors
- Include errors in the SplusDataResult.Warnings
- Include warnings in the SplusDataResult.Expr
- Include the expression (cmd) reformatted to match the
width of the output.
RemoteException
SplusEngineBusyException
SplusIncompleteExpressionException
public SplusDataResult evalDataQuery(String cmd, boolean Output, boolean Result, boolean Errors, boolean Warnings, boolean Expr, int timeout) throws RemoteException, SplusEngineBusyException, SplusIncompleteExpressionException
SplusSession
This version of the method has boolean flags to indicate which elements to include in the SplusDataResult. Set specific flags to false to avoid shipping over unnecessary information.
evalDataQuery
in interface SplusSession
cmd
- Expression to evaluate.Output
- Include output in the SplusDataResult.Result
- Include data in the SplusDataResult.Errors
- Include errors in the SplusDataResult.Warnings
- Include warnings in the SplusDataResult.Expr
- Include the expression (cmd) reformatted to match the
width of the output.timeout
- Seconds to wait before generating an Engine Busy error.
RemoteException
SplusEngineBusyException
SplusIncompleteExpressionException
public SplusDataResult evalDataQuery(String cmd, boolean Output, boolean Result, boolean Errors, boolean Warnings, boolean Expr, boolean pingEngine, boolean parseTest) throws RemoteException, SplusEngineBusyException, SplusIncompleteExpressionException
SplusSession
This version of the method has boolean flags to indicate which elements to include in the SplusDataResult. Set specific flags to false to avoid shipping over unnecessary information.
Additional flags are available to defeat the checking for engine availability and command completeness. This is generally unsafe. If, however, one is certain that the command is correct and the engine is not busy with a previous command or with requests from some other thread, it will speed up the method call by about 150 ms.
evalDataQuery
in interface SplusSession
cmd
- Expression to evaluate.Output
- Include output in the SplusDataResult.Result
- Include data in the SplusDataResult.Errors
- Include errors in the SplusDataResult.Warnings
- Include warnings in the SplusDataResult.Expr
- Include the expression (cmd) reformatted to match the
width of the output.pingEngine
- Perform a check to see if the S-PLUS engine is
responsive.parseTest
- Perform a check to see if the command parses before
attempting to evaluate it.
RemoteException
SplusEngineBusyException
SplusIncompleteExpressionException
public void Interrupt() throws RemoteException
SplusSession
Interrupt
in interface SplusSession
RemoteException
public void setClientObjectFactory(ClientObjectFactory factory) throws RemoteException
SplusSession
setClientObjectFactory
in interface SplusSession
RemoteException
public static ClientObjectFactory getClientObjectFactory()
public FileInputStreamProxy getFileInputStream(String filename) throws FileNotFoundException, RemoteException
SplusSession
getFileInputStream
in interface SplusSession
FileNotFoundException
RemoteException
public FileOutputStreamProxy getFileOutputStream(String filename) throws FileNotFoundException, RemoteException
SplusSession
getFileOutputStream
in interface SplusSession
FileNotFoundException
RemoteException
public void startPollOutput(SplusOutputHandler handler)
SplusSession
startPollOutput
in interface SplusSession
public void pollOutput(SplusOutputHandler handler)
public boolean isRemote()
SplusSession
isRemote
in interface SplusSession
public void sessionExit(boolean killClient)
SplusSession
sessionExit
in interface SplusSession
killClient
- true to tell the client to shut itself down.public void sessionExit()
SplusSession
sessionExit
in interface SplusSession
protected void finalize() throws Throwable
Throwable
public static void clientShutdown()
public static SplusSession getRemoteSession(boolean useDialog, ClientObjectFactory objFact, String[] clArgs)
protected static SplusSession loginWithSystemProperties(String[] clArgs)
public String getCertFilename() throws RemoteException
SplusSession
getCertFilename
in interface SplusSession
RemoteException
public char[] getCertAccess() throws RemoteException
SplusSession
getCertAccess
in interface SplusSession
RemoteException
public ClientUtilities getClientUtilities() throws RemoteException
getClientUtilities
in interface SplusSession
RemoteException
|
S-PLUS Connect/Java v1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |