built-in method
before/3
ï
Descriptionï
before(Object, Message, Sender)
User-defined method for handling before events.
This method is declared in the monitoring built-in
protocol as a public predicate and is automatically called by the runtime for
messages sent using the (::)/2 control construct
from within objects compiled with the events flag set
to allow
.
Note that you can make this predicate scope protected or private by using,
respectively, protected or private implementation
of the monitoring
protocol.
Modes and number of proofsï
before(?object_identifier, ?callable, ?object_identifier) - zero_or_more
Errorsï
(none)
Examplesï
:- object(...,
implements(monitoring),
...).
% write a log message when a message is sent:
before(Object, Message, Sender) :-
writeq(Object), write('::'), writeq(Message),
write(' from '), writeq(Sender), nl.
See also