Class type Swarm.SWARM.notifier_type


class type notifier_type = object  end
The notifier is used to communicate from the resident to the swarm. Every resident must use these methods to give orders to the Swarm, rather than use the harness methods - which are not appropriate anyway.

method notify : unit
FIXME: Remove this method? Is it really useful?
method release : projection -> bindhalf -> unit
The resident core should call release p b to release the binding defined on projection p with the bindhalf b. The method can not fail. If there is no such binding, nothing is done.
method transfer : projection ->
bindhalf ->
projection -> bindhalf -> unit
The resident core calls transfer op ob np nb to transfer the binding associated to op, ob to a new projection np and a new bindhalf nb. It is the responsibility of the resident core to manufacture an appropriate bindhalf - matching is not checked. The new projection np may or may not be active at the time of the transfer. The old projection is released. No further method is called on the originating resident (such as unimate_... or release) and the opposite resident is not made aware of the transfer. op, ob should be bound, otherwise No_such_binding is raised. However, it is the responsibility of the caller to verify that np, nb forms a valid new binding - in particular, that it is not already occupied.
method get_symmetric : projection -> bindhalf -> bindhalf
get_symmetric p b will return the other bindhalf visible to the resident on the other side of the projection. This can be necessary to extract information about the binding. For example, the Incubator uses this method.
method split : projection ->
bindhalf ->
bindhalf ->
projection ->
bindhalf -> splitmessage -> unit
Call split p1 b1 b1p p2 b2 msg in order to split the binding attached to p1, b1 into two parts. The target resident will be split in two by calling tarsplit on it. The first part will remain attached to p1 with the new bindhalf b1p while the second part will become attached to p2, b2. All the other bindings on the target resident will be handled according to the result provided by tarsplit. msg is a resident-private splitting message which will be passed on to the resident to be split. If p1, b1 is not bound, exception No_such_binding is raised. However, it is the responsibility of the called to verify that p2, b2 and p1, b1p form a valid new binding - in particular, that they are not already occupied.
method join : projection ->
bindhalf ->
projection ->
bindhalf ->
bindhalf -> joinmessage -> unit
FIXME: join p1 b1 p2 b2 b1p msg blah blah, stays on projection 1; tarjoin is called just on the first, which is responsible for calling whatever on the second.