com.parctechnologies.eclipse
Class OutOfProcessEclipse

java.lang.Object
  |
  +--com.parctechnologies.eclipse.OutOfProcessEclipse

public class OutOfProcessEclipse
extends java.lang.Object
implements EclipseConnection, EclipseEngine

An ECLiPSe engine which runs in a child process of the Java virtual machine. An OutOfProcessEclipse is created using the public constructor, which takes an EclipseEngineOptions object. A JVM may have any number of instances of this class. Invocation of the destroy() method does not affect the ability to create new OutOfProcessEclipse instances.


Constructor Summary
OutOfProcessEclipse(EclipseEngineOptions options)
          Create a new OutOfProcessEclipse using the supplied options.
 
Method Summary
 void compile(java.io.File f)
           
 void destroy()
          Terminate the OutOfProcessEclipse process and the connection to it.
 FromEclipseQueue getEclipseStderr()
           
 ToEclipseQueue getEclipseStdin()
           
 FromEclipseQueue getEclipseStdout()
           
 FromEclipseQueue getFromEclipseQueue(java.lang.String name)
           
 java.lang.String getPath(java.io.File f)
           
 Atom getPeerName()
           
 ToEclipseQueue getToEclipseQueue(java.lang.String name)
           
 boolean isUsingQueues()
           
 EclipseMultitaskConnection registerMultitask(MultitaskListener multitaskListener)
           
 CompoundTerm rpc(CompoundTerm goal)
           
 CompoundTerm rpc(java.lang.Object[] goalTerm)
           
 CompoundTerm rpc(java.lang.String goal)
           
 CompoundTerm rpc(java.lang.String functor, java.lang.Object arg1)
           
 CompoundTerm rpc(java.lang.String functor, java.lang.Object[] args)
           
 CompoundTerm rpc(java.lang.String functor, java.lang.Object arg1, java.lang.Object arg2)
           
 CompoundTerm rpc(java.lang.String functor, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
           
 CompoundTerm rpc(java.lang.String functor, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
           
 CompoundTerm rpc(java.lang.String functor, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4, java.lang.Object arg5)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutOfProcessEclipse

public OutOfProcessEclipse(EclipseEngineOptions options)
                    throws java.io.IOException,
                           EclipseException
Create a new OutOfProcessEclipse using the supplied options.
Parameters:
options - settings for the new ECLiPSe engine.
Throws:
java.io.IOException - if the connection to the child process failed
EclipseException - if there was a problem setting up the ECLiPSe side of the connection.
Method Detail

isUsingQueues

public boolean isUsingQueues()
Specified by:
isUsingQueues in interface EclipseEngine

getEclipseStdin

public ToEclipseQueue getEclipseStdin()
                               throws EclipseTerminatedException
Specified by:
getEclipseStdin in interface EclipseEngine

getEclipseStdout

public FromEclipseQueue getEclipseStdout()
                                  throws EclipseTerminatedException
Specified by:
getEclipseStdout in interface EclipseEngine

getEclipseStderr

public FromEclipseQueue getEclipseStderr()
                                  throws EclipseTerminatedException
Specified by:
getEclipseStderr in interface EclipseEngine

destroy

public void destroy()
             throws java.io.IOException
Terminate the OutOfProcessEclipse process and the connection to it. After destroy() has been invoked, future invocations of public methods will throw EclipseTerminatedExceptions
Throws:
EclipseTerminatedException - if the destroy() method had already been called.

rpc

public CompoundTerm rpc(java.lang.String goal)
                 throws EclipseException,
                        java.io.IOException
Specified by:
rpc in interface EclipseConnection

rpc

public CompoundTerm rpc(CompoundTerm goal)
                 throws EclipseException,
                        java.io.IOException
Specified by:
rpc in interface EclipseConnection

getFromEclipseQueue

public FromEclipseQueue getFromEclipseQueue(java.lang.String name)
                                     throws EclipseException,
                                            java.io.IOException
Specified by:
getFromEclipseQueue in interface EclipseConnection

getToEclipseQueue

public ToEclipseQueue getToEclipseQueue(java.lang.String name)
                                 throws EclipseException,
                                        java.io.IOException
Specified by:
getToEclipseQueue in interface EclipseConnection

compile

public void compile(java.io.File f)
             throws EclipseException,
                    java.io.IOException
Specified by:
compile in interface EclipseConnection

getPath

public java.lang.String getPath(java.io.File f)
                         throws EclipseException,
                                java.io.IOException
Specified by:
getPath in interface EclipseConnection

rpc

public CompoundTerm rpc(java.lang.String functor,
                        java.lang.Object arg1)
                 throws EclipseException,
                        java.io.IOException
Specified by:
rpc in interface EclipseConnection

rpc

public CompoundTerm rpc(java.lang.String functor,
                        java.lang.Object arg1,
                        java.lang.Object arg2)
                 throws EclipseException,
                        java.io.IOException
Specified by:
rpc in interface EclipseConnection

rpc

public CompoundTerm rpc(java.lang.String functor,
                        java.lang.Object arg1,
                        java.lang.Object arg2,
                        java.lang.Object arg3)
                 throws EclipseException,
                        java.io.IOException
Specified by:
rpc in interface EclipseConnection

rpc

public CompoundTerm rpc(java.lang.String functor,
                        java.lang.Object arg1,
                        java.lang.Object arg2,
                        java.lang.Object arg3,
                        java.lang.Object arg4)
                 throws EclipseException,
                        java.io.IOException
Specified by:
rpc in interface EclipseConnection

rpc

public CompoundTerm rpc(java.lang.String functor,
                        java.lang.Object arg1,
                        java.lang.Object arg2,
                        java.lang.Object arg3,
                        java.lang.Object arg4,
                        java.lang.Object arg5)
                 throws EclipseException,
                        java.io.IOException
Specified by:
rpc in interface EclipseConnection

rpc

public CompoundTerm rpc(java.lang.String functor,
                        java.lang.Object[] args)
                 throws EclipseException,
                        java.io.IOException
Specified by:
rpc in interface EclipseConnection

rpc

public CompoundTerm rpc(java.lang.Object[] goalTerm)
                 throws EclipseException,
                        java.io.IOException
Specified by:
rpc in interface EclipseConnection

getPeerName

public Atom getPeerName()
Specified by:
getPeerName in interface EclipseConnection

registerMultitask

public EclipseMultitaskConnection registerMultitask(MultitaskListener multitaskListener)
                                             throws EclipseException,
                                                    java.io.IOException
Specified by:
registerMultitask in interface EclipseConnection