javamath.server.cas.impl.Maple
Class Session
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--javamath.server.cas.impl.Maple.Session
- All Implemented Interfaces:
- CASession, java.rmi.Remote, java.io.Serializable, java.rmi.server.Unreferenced
- public class Session
- extends java.rmi.server.UnicastRemoteObject
- implements CASession, java.rmi.server.Unreferenced
This class implements a session with the MAPLE computer algebra system.
- See Also:
- Serialized Form
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
|
Constructor Summary |
Session()
Construct a MAPLE session. |
|
Method Summary |
void |
assignOpenMath(java.lang.String varname,
javamath.server.cas.impl.Maple.OMObject obj)
|
void |
closeSession()
|
javamath.server.cas.impl.Maple.OMObject |
evaluateOpenMath(javamath.server.cas.impl.Maple.OMObject obj)
Send an OpenMath object to MAPLE and obtain the result of sending
the object. |
java.lang.String |
getNativeError()
Retrieves the error message generated by the last command sent
to the compute engine. |
java.lang.String |
getNativeOutput()
Retrieves the output of the last command sent to the compute engine. |
java.lang.String |
nativeEvaluate(java.lang.String command)
This method is pretty generic. |
javamath.server.cas.impl.Maple.OMObject |
retrieveOpenMath(java.lang.String varname)
Retrieve the object stored in variable varname
in the compute engine as
an OpenMath object. |
void |
sendNativeCommand(java.lang.String command)
Send a command in the native language of the compute engine. |
void |
unreferenced()
Close down the MAPLE process when all clients have completed. |
| 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 |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Session
public Session()
throws java.rmi.RemoteException
- Construct a MAPLE session. This starts MAPLE and waits for MAPLE
to be ready
for input. If MAPLE fails to start properly for any reason (does not
execute or signals an error via an @e control), a remote exception
is thrown back to the client.
evaluateOpenMath
public javamath.server.cas.impl.Maple.OMObject evaluateOpenMath(javamath.server.cas.impl.Maple.OMObject obj)
- Send an OpenMath object to MAPLE and obtain the result of sending
the object.
assignOpenMath
public void assignOpenMath(java.lang.String varname,
javamath.server.cas.impl.Maple.OMObject obj)
throws java.rmi.RemoteException
retrieveOpenMath
public javamath.server.cas.impl.Maple.OMObject retrieveOpenMath(java.lang.String varname)
- Description copied from interface:
CASession
- Retrieve the object stored in variable varname
in the compute engine as
an OpenMath object.
- Specified by:
retrieveOpenMath in interface CASession
sendNativeCommand
public void sendNativeCommand(java.lang.String command)
throws java.rmi.RemoteException
- Description copied from interface:
CASession
- Send a command in the native language of the compute engine.
Doesn't wait for execution to complete.
- Specified by:
sendNativeCommand in interface CASession
getNativeOutput
public java.lang.String getNativeOutput()
- Description copied from interface:
CASession
- Retrieves the output of the last command sent to the compute engine.
- Specified by:
getNativeOutput in interface CASession
getNativeError
public java.lang.String getNativeError()
- Description copied from interface:
CASession
- Retrieves the error message generated by the last command sent
to the compute engine.
- Specified by:
getNativeError in interface CASession
nativeEvaluate
public java.lang.String nativeEvaluate(java.lang.String command)
throws java.rmi.RemoteException
- This method is pretty generic. Perhaps we should have superclass?
- Specified by:
nativeEvaluate in interface CASession
unreferenced
public void unreferenced()
- Close down the MAPLE process when all clients have completed.
- Specified by:
unreferenced in interface java.rmi.server.Unreferenced
closeSession
public void closeSession()
- Specified by:
closeSession in interface CASession