public class DefaultConnection extends Object implements ConnectionProxy
ConnectionProxy that delegates to an underlying OtpConnection.| Constructor and Description |
|---|
DefaultConnection(com.ericsson.otp.erlang.OtpConnection otpConnection) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection to the remote node.
|
com.ericsson.otp.erlang.OtpConnection |
getTargetConnection() |
com.ericsson.otp.erlang.OtpErlangObject |
receiveRPC()
Receive an RPC reply from the remote Erlang node.
|
void |
sendRPC(String mod,
String fun,
com.ericsson.otp.erlang.OtpErlangList args)
Send an RPC request to the remote Erlang node.
|
public DefaultConnection(com.ericsson.otp.erlang.OtpConnection otpConnection)
public void close()
Connectionclose in interface Connectionpublic void sendRPC(String mod, String fun, com.ericsson.otp.erlang.OtpErlangList args) throws IOException
Connection
{ self, { call, Mod, Fun, Args, user } }
Note that this method has unpredicatble results if the remote node is not an Erlang node.
sendRPC in interface Connectionmod - the name of the Erlang module containing the function to
be called.fun - the name of the function to call.args - a list of Erlang terms, to be used as arguments to the
function.IOException - if the connection is not active or a communication
error occurs.public com.ericsson.otp.erlang.OtpErlangObject receiveRPC()
throws IOException,
com.ericsson.otp.erlang.OtpErlangExit,
com.ericsson.otp.erlang.OtpAuthException
Connection
{ rex, Term }
receiveRPC in interface ConnectionIOException - if the connection is not active or a communication
error occurs.com.ericsson.otp.erlang.OtpErlangExit - if an exit signal is received from a process on the
peer node.com.ericsson.otp.erlang.OtpAuthException - if the remote node sends a message containing an
invalid cookie.public com.ericsson.otp.erlang.OtpConnection getTargetConnection()
getTargetConnection in interface ConnectionProxy