public class RemoteEclipse extends EclipseConnectionImpl implements EclipseConnection
remote_connect/3
or the remote_connect_setup/3
builtin predicates. As well as the functionality provided by the
EclipseConnection interface, RemoteEclipse also allows for
execution control to be transferred explicity over to ECLiPSe with the
resume()
method.
The connection is terminated from the Java side using either the
disconnect()
method (when Java has execution control) or
unilateralDisconnect()
(when ECLiPSe has execution control).
If the builtin predicate remote_disconnect/1
is executed on
the ECLiPSe side, the effect on the Java side are similar to the
effects of disconnect()
.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TIMEOUT_MILLIS |
Constructor and Description |
---|
RemoteEclipse(java.net.InetAddress remoteEclipseHost,
int remoteEclipsePort)
Make a connection to an existing ECLiPSe process.
|
RemoteEclipse(java.net.InetAddress remoteEclipseHost,
int remoteEclipsePort,
int timeoutMillis)
Make a connection to an existing ECLiPSe process.
|
RemoteEclipse(java.net.InetAddress remoteEclipseHost,
int remoteEclipsePort,
java.lang.String passwd)
Make a connection to an existing ECLiPSe process.
|
RemoteEclipse(java.net.InetAddress remoteEclipseHost,
int remoteEclipsePort,
java.lang.String passwd,
int timeoutMillis)
Make a connection to an existing ECLiPSe process.
|
Modifier and Type | Method and Description |
---|---|
void |
disconnect()
Terminate the remote connection to ECLiPSe.
|
void |
resume()
Explicitly transfer execution control to ECLiPSe.
|
void |
unilateralDisconnect()
Terminate the connection with ECLiPSe unilaterally.
|
compile, getAsyncEclipseQueue, getFromEclipseQueue, getPath, getPeerName, getToEclipseQueue, registerMultitask, rpc, rpc, rpc, rpc, rpc, rpc, rpc, rpc, rpc
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compile, getAsyncEclipseQueue, getFromEclipseQueue, getPath, getPeerName, getToEclipseQueue, registerMultitask, rpc, rpc, rpc, rpc, rpc, rpc, rpc, rpc, rpc
public static final int DEFAULT_TIMEOUT_MILLIS
public RemoteEclipse(java.net.InetAddress remoteEclipseHost, int remoteEclipsePort, java.lang.String passwd) throws java.io.IOException
remote_connect_setup/3
. The builtin predicate
remote_connect_accept/6
should then be used to complete the
connection. The connection details
(IP address, port number, password) are specified as parameters and must match those
specified/returned as arguments in the execution of
remote_connect_setup/3
and remote_connect_accept/6
.java.io.IOException
- if the connection could not be made, or times out
within DEFAULT_TIMEOUT_MILLIS
milliseconds.public RemoteEclipse(java.net.InetAddress remoteEclipseHost, int remoteEclipsePort) throws java.io.IOException
remote_connect/3
. The connection details
(IP address, port number) are specified as parameters and must match those
specified/returned as arguments in the execution of
remote_connect/3
. If remote_connect_setup/3
. was
used to prime ECLiPSe for the remote connection, this constructor will fail
as it does not use a password.java.io.IOException
- if the connection could not be made, or times out
within DEFAULT_TIMEOUT_MILLIS
milliseconds.public RemoteEclipse(java.net.InetAddress remoteEclipseHost, int remoteEclipsePort, int timeoutMillis) throws java.io.IOException
remote_connect/3
. The connection details
(IP address, port number) are specified as parameters and must match those
specified/returned as arguments in the execution of
remote_connect/3
. If remote_connect_setup/3
. was
used to prime ECLiPSe for the remote connection, this constructor will fail
as it does not use a password.timeoutMillis
- number of milliseconds to wait for the initial
connection to be established before throwing an exception. Set
timeoutMillis
to 0 to wait indefinitely for the connection.java.io.IOException
- if the connection could not be made, or times out
within timeoutMillis
milliseconds.public RemoteEclipse(java.net.InetAddress remoteEclipseHost, int remoteEclipsePort, java.lang.String passwd, int timeoutMillis) throws java.io.IOException
remote_connect_setup/3
. The builtin predicate
remote_connect_accept/6
should then be used to complete the
connection. The connection details
(IP address, port number, password) are specified as parameters and must match those
specified/returned as arguments in the execution of
remote_connect_setup/3
and remote_connect_accept/6
.timeoutMillis
- number of milliseconds to wait for the initial
connection to be established before throwing an exception. Set
timeoutMillis
to 0 to wait indefinitely for the connection.java.io.IOException
- if the connection could not be made, or times out
within timeoutMillis
milliseconds.public void unilateralDisconnect() throws EclipseTerminatedException
unilateralDisconnect
has
been invoked, public methods invoked on this RemoteEclipse will
throw EclipseTerminatedExceptions.EclipseTerminatedException
- if the connection has already been
terminated.public void disconnect() throws java.io.IOException
unlateralDisconnect
instead. After disconnect
has
been invoked, public methods invoked on this RemoteEclipse will
throw EclipseTerminatedExceptions.EclipseTerminatedException
- if the connection has already been
terminated.java.io.IOException
- if there was a problem communicating with ECLiPSe
during disconnection.public void resume() throws java.io.IOException
remote_connect/3
or
remote_connect_setup/3
). This method should not be
invoked while control has been transferred to Java using a
QueueListener. An invocation of resume()
should
normally be paired with an execution of the builtin predicate
remote_yield/1
, which can return execution control to Java.EclipseTerminatedException
- if the connection to ECLiPSe has been
terminated.java.io.IOException
- if there was a problem communicating with ECLiPSe.