javamath.server.cas.impl.GAP
Class Session

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--javamath.server.cas.impl.GAP.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 GAP computer algebra system.

See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
Session()
          Construct a GAP session.
 
Method Summary
 void assignOpenMath(java.lang.String varname, javamath.server.cas.impl.GAP.OMObject obj)
           
 void closeSession()
          Close down the GAP process when all clients have completed.
 javamath.server.cas.impl.GAP.OMObject evaluateOpenMath(javamath.server.cas.impl.GAP.OMObject obj)
          Send an OpenMath object to GAP 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()
          unimplemented for GAP
 java.lang.String nativeEvaluate(java.lang.String command)
          This method is pretty generic.
 javamath.server.cas.impl.GAP.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()
           
 
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
 
Methods inherited from interface javamath.server.cas.CASession
assignOpenMath, evaluateOpenMath
 

Constructor Detail

Session

public Session()
        throws java.rmi.RemoteException
Construct a GAP session. This starts GAP and waits for GAP to be ready for input. If GAP 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.
Method Detail

evaluateOpenMath

public javamath.server.cas.impl.GAP.OMObject evaluateOpenMath(javamath.server.cas.impl.GAP.OMObject obj)
Send an OpenMath object to GAP and obtain the result of sending the object.

assignOpenMath

public void assignOpenMath(java.lang.String varname,
                           javamath.server.cas.impl.GAP.OMObject obj)

retrieveOpenMath

public javamath.server.cas.impl.GAP.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)
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()
unimplemented for GAP
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

closeSession

public void closeSession()
Close down the GAP process when all clients have completed.
Specified by:
closeSession in interface CASession

unreferenced

public void unreferenced()
Specified by:
unreferenced in interface java.rmi.server.Unreferenced