Liking cljdoc? Tell your friends :D

jiface.otp.connection


abstract-connection-behaviourclj

source

AbstractConnectionObjectcljprotocol

Maintains a connection between a Java process and a remote Erlang, Java or C node. The object maintains connection state and allows data to be sent to and received from the peer.

This abstract class provides the neccesary methods to maintain the actual connection and encode the messages and headers in the proper format according to the Erlang distribution protocol. Subclasses can use these methods to provide a more or less transparent communication channel as desired.

Note that no receive methods are provided. Subclasses must provide methods for message delivery, and may implement their own receive methods.

If an exception occurs in any of the methods in this class, the connection will be closed and must be reopened in order to resume communication with the peer. This will be indicated to the subclass by passing the exception to its deliver function.

The System property OtpConnection.trace can be used to change the initial trace level setting for all connections. Normally the initial trace level is 0 and connections are not traced unless set-trace-level is used to change the setting for a particular connection. OtpConnection.trace can be used to turn on tracing by default for all connections.

Maintains a connection between a Java process and a remote Erlang, Java or C
node. The object maintains connection state and allows data to be sent to and
received from the peer.

This abstract class provides the neccesary methods to maintain the actual
connection and encode the messages and headers in the proper format according
to the Erlang distribution protocol. Subclasses can use these methods to
provide a more or less transparent communication channel as desired.

Note that no receive methods are provided. Subclasses must provide methods
for message delivery, and may implement their own receive methods.

If an exception occurs in any of the methods in this class, the connection
will be closed and must be reopened in order to resume communication with the
peer. This will be indicated to the subclass by passing the exception to its
``deliver`` function.

The ``System`` property ``OtpConnection.trace`` can be used to change the
initial trace level setting for all connections. Normally the initial trace
level is 0 and connections are not traced unless ``set-trace-level`` is used
to change the setting for a particular connection. ``OtpConnection.trace``
can be used to turn on tracing by default for all connections.

closeclj

(close this)

Close the connection to the remote node.

Close the connection to the remote node.

connected?clj

(connected? this)

Determine if the connection is still alive.

Determine if the connection is still alive.

deliverclj

(deliver this msg-or-exception)

Deliver messages or communication exceptions to the recipient.

Deliver messages or communication exceptions to the recipient.

get-flagsclj

(get-flags this)

get-trace-levelclj

(get-trace-level this)

Get the trace level for this connection.

Get the trace level for this connection.

runclj

(run this)

set-flagsclj

(set-flags this flag-integer)

set-trace-levelclj

(set-trace-level this level-integer)

Set the trace level for this connection.

Set the trace level for this connection.
sourceraw docstring

connection-behaviourclj

source

ConnectionObjectcljprotocol

Maintains a connection between a Java process and a remote Erlang, Java or C node. The object maintains connection state and allows data to be sent to and received from the peer.

Once a connection is established between the local node and a remote node, the connection object can be used to send and receive messages between the nodes and make rpc calls (assuming that the remote node is a real Erlang node).

The various receive methods are all blocking and will return only when a valid message has been received or an exception is raised.

If an exception occurs in any of the methods in this class, the connection will be closed and must be explicitely reopened in order to resume communication with the peer.

It is not possible to create an instance of this class directly. OtpConnection objects are returned by OtpSelf.connect() and OtpSelf.accept().

Maintains a connection between a Java process and a remote Erlang, Java or C
node. The object maintains connection state and allows data to be sent to and
received from the peer.

Once a connection is established between the local node and a remote node,
the connection object can be used to send and receive messages between the
nodes and make rpc calls (assuming that the remote node is a real Erlang
node).

The various receive methods are all blocking and will return only when a
valid message has been received or an exception is raised.

If an exception occurs in any of the methods in this class, the connection
will be closed and must be explicitely reopened in order to resume
communication with the peer.

It is not possible to create an instance of this class directly.
``OtpConnection`` objects are returned by ``OtpSelf.connect()`` and
``OtpSelf.accept()``.

receive-bufclj

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

Receive a raw (still encoded) message from a remote process.

Receive a raw (still encoded) message from a remote process.

unlinkclj

(unlink this dest-pid)

Remove a link between the local node and the specified process on the remote node.

Remove a link between the local node and the specified process on the
remote node.

send-bufclj

(send-buf this dest msg)

Send a pre-encoded message to a process on a remote node. dest may be either a String or an OtpErlangPid.

Send a pre-encoded message to a process on a remote node. `dest` may be
either a `String` or an `OtpErlangPid`.

send-rpcclj

(send-rpc this mod fun args)

Send an RPC request to the remote Erlang node. args may be either an array of OtpErlangObjects or an OtpErlangList.

Send an RPC request to the remote Erlang node. `args` may be either
an array of `OtpErlangObject`s or an `OtpErlangList`.

get-peerclj

(get-peer this)

Get information about the node at the peer end of this connection.

Get information about the node at the peer end of this connection.

receive-rpcclj

(receive-rpc this)

Receive an RPC reply from the remote Erlang node.

Receive an RPC reply from the remote Erlang node.

exitclj

(exit this dest-pid reason)

Send an exit signal to a remote process.

Send an exit signal to a remote process.

receive-msgclj

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

Receive a messge complete with sender and recipient information.

Receive a messge complete with sender and recipient information.

receiveclj

(receive this)
(receive this timeout)

Receive a message from a remote process.

Receive a message from a remote process.

linkclj

(link this dest-pid)

Create a link between the local node and the specified process on the remote node.

Create a link between the local node and the specified process on the
remote node.

get-selfclj

(get-self this)

Get information about the node at the local end of this connection.

Get information about the node at the local end of this connection.

sendclj

(send this dest msg)

Send a message to a process on a remote node. dest may be either a String or an OtpErlangPid.

Send a message to a process on a remote node. `dest` may be either a
`String` or an `OtpErlangPid`.

get-msg-countclj

(get-msg-count this)

Return the number of messages currently waiting in the receive queue for this connection.

Return the number of messages currently waiting in the receive queue for
this connection.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close