Engine.stop - shutdown the kernel
|
Calling Sequence
|
|
void stop() throws MapleException
|
|
Description
|
|
•
|
The stop method shuts down the Maple session represented by the Engine object.
|
•
|
Any Algebraic objects will have their dispose method called. These objects can no longer be used to reference the values they represented before stop was called.
|
•
|
Even after stopping the current Engine object, new Engine objects cannot be created.
|
|
|
Examples
|
|
import com.maplesoft.openmaple.*;
|
import com.maplesoft.externalcall.MapleException;
|
class Example
|
{
|
public static void main( String notused[] ) throws MapleException
|
{
|
String mapleArgs[];
|
Engine engine;
|
Numeric n;
|
List l;
|
RTable r;
|
mapleArgs = new String[1];
|
mapleArgs[0] = "java";
|
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
|
null, null );
|
n = engine.newNumeric( 1000 );
|
l = (List)engine.evaluate( "[1,2,3,4]:" );
|
r = (RTable)engine.evaluate( "Array( 1..10, 1..10 ):" );
|
System.out.println( n.isDisposed() );
|
System.out.println( l.isDisposed() );
|
System.out.println( r.isDisposed() );
|
engine.stop();
|
System.out.println( n.isDisposed() );
|
System.out.println( l.isDisposed() );
|
System.out.println( r.isDisposed() );
|
try
|
{
|
engine.evaluate( "1+1;" );
|
}
|
catch ( MapleException me )
|
{
|
System.out.println( "Error: "+me.getMessage() );
|
}
|
}
|
}
|
|
|
Executing this code produces the following output.
false
|
false
|
false
|
true
|
true
|
true
|
|
|
|
|
Download Help Document
Was this information helpful?