abstract class Bus::Handler
- Bus::Handler
- Reference
- Object
Defined in:
bus/handler.crConstructors
Instance Method Summary
-
#authorized_to_handle?(msg)
Override this if only certain users should be authorized to have access to the given handler.
- #bus : Bus | Nil
-
#can_handle?(msg)
This should probably be overridden in subclasses so that they can make informed decisions about whether or not they can handle the message.
-
#evaluate(msg : Bus::Message)
All implementations of
-
#evaluated_count
Return the number of times that this handler has evaluated a message.
- #handle(msg : Bus::Message)
-
#handled_count
Return the number of times that this handler has handled a message.
- #listen
- #run
- #subscribe(bus : Bus)
-
#will_handle?(msg)
This method determines if the handler will handle the message.
Constructor Detail
Instance Method Detail
Override this if only certain users should be authorized to have access to the given handler.
This should probably be overridden in subclasses so that they can make informed decisions about whether or not they can handle the message.
This method determines if the handler will handle the message. It
checks #can_handle? to see if the handler is able to handle the
message, and #authorized_to_handle? to see if the handler has
permission to handle the message.