clojang.mbox

!

An alias for #'mbox/send.

close

(close)(close node)

equal?

(equal? this other-obj)

Determine if two mailboxes are equal.

exit

(exit this reason)(exit this recip-pid reason)

Close the given mailbox with a given reason or send an exit signal to a remote pid.

get-default

Get the mbox for the default node.

If an optional node instance is passed, a new mbox will be returned for that node.

The results of this function are memoized as the intent is to obtain a singleton instance for the default node. (The Erlang JInterface docs recommend that only one node be run per JVM instance.)

get-name

(get-name this)

Get the registered name of this mailbox.

get-names

(get-names inbox)

An alias for jiface.otp.messaging/get-names that returns a vector of names on the same node as the given inbox

get-pid

(get-pid this)

Alias for self.

new

(new node-instance)(new node-instance mbox-name)

An alias for jiface.otp.messaging/mbox.

ping

(ping this node-name)(ping this node-name timeout)

Create a connection to a remote node.

receive

(receive)(receive inbox)(receive inbox timeout)

An alias for jiface.otp.messaging/receive that returns the received data as Clojure data types.

receive-buf

(receive-buf this)(receive-buf this timeout)

Block until a message (Erlang input stream) arrives for this mailbox, or if a timeout is given, wait for a message until the timeout has been reached.

receive-msg

(receive-msg this)(receive-msg this timeout)

Block until a message (OTP message) arrives for this mailbox, or if a timeout is given, wait for a message until the timeout has been reached.

register-name

(register-name & args)

An alias for jiface.otp.messaging/register-name that also allows for mailbox and node name arguments to be symbols, keywords, or strings.

self

(self)(self mbox)

send

multimethod

An alias for jiface.otp.messaging/send. This version of the function also: * allows for mailbox and node name arguments to be symbols, keywords, or strings; * allows for node and mbox objects to be passed (useful for dire’s with-finally! function); * allows for ‘client’ data to be passed (a map of {:self node :inbox mbox} – simplifies message-passing code)