clojang.mbox

add

(add mbox-name)(add mbox-name node-instance)

Add an mbox to an existing node.

close

(close)(close mbox)

Close the default or named mailbox.

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-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 inbox)

new

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

An alias for jiface.otp.messaging/mbox.

ping

(ping node-name)(ping node-name timeout)(ping inbox node-name timeout)

An alias for jiface.otp.messaging/ping that returns the same values as Erlang (pong/pang).

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; * converts between Erlang and Clojure objects