clojang.rpc
The clojang.rpc
namespace has no analong in the JInterface package. This namepsace intends to provide a similar interface as that provided by the clojang.conn
namespace: a set of functions for sending and receiving messages to and from remote processes. In this case, however, there is a very specfic client we expect to be receiving requests from and replying to: an RPC client, and one that expects this namespace to provide functions compatible with the RPC capabilities of an Erlang/OTP gen_server
.
!
call
(call peer-node-name & args)
Send a blocking RPC message to a remote node. The function unblocks when the response message is received. Named after the function of the same name in the LFE/Erlang rpc
module, this function is intended to be used with remote functions that return a result.
cast
(cast peer-node-name & args)
Send a blocking RPC message to a remote node. The function unblocks when the response message is received. Named after the function of the same name in the LFE/Erlang rpc
module, this function is not intended to be used with remote functions that return a result. It will not return a value other than :ok
, even if the remote function does return a value.
close
(close peer-node-name)
(close self-node-name peer-node-name)
Close the connection to a remote node. Optionally, a local node name may be provided; otherwise, default node name is assumed for the local node.
deliver
(deliver this msg-or-exception)
Deliver messages or communication exceptions to the recipient.
exit
(exit this dest-pid reason)
Send an exit signal to a remote process.
get-msg-count
(get-msg-count this)
Return the number of messages currently waiting in the receive queue for this connection.
get-peer
(get-peer this)
Get information about the node at the peer end of this connection.
get-self
(get-self this)
Get information about the node at the local end of this connection.
link
(link this dest-pid)
Create a link between the local node and the specified process on the remote node.
open
(open peer-node-name)
(open self-node-name peer-node-name)
Open an RPC connection to a remote node. Optionally, a local node name may be provided; otherwise, default node name is assumed for the local node.
Though this is required for RPC connections, the connection object is a general one. Once opened, the connection may be used for anything.
receive
(receive peer-node-name & args)
Receive an RPC message from a remote node.
receive-buf
(receive-buf this)
(receive-buf this timeout)
Receive a raw (still encoded) message from a remote process.
send
(send peer-node-name & args)
Send an RPC message to the remote node.
send-buf
(send-buf this desg msg)
Send a pre-encoded message to a process on a remote node.
unlink
(unlink this dest-pid)
Remove a link between the local node and the specified process on the remote node.