Class | Qpid::Proton::Event::EventBase |
In: |
lib/event/event_base.rb
|
Parent: | Object |
EventBase is the foundation for creating application-specific events.
@example
# SCENARIO: A continuation of the example in EventType. # # An Event class is defined to handle receiving encrypted # data from a remote endpoint. class EncryptedDataEvent < EventBase def initialize(message) super(EncryptedDataEvent, message, Qpid::Proton::Event::ENCRYPTED_RECV) end end # at another point, when encrypted data is received msg = Qpid::Proton::Message.new msg.decode(link.receive(link.pending)) if encrypted?(msg) collector.put(EncryptedDataEvent.new(msg) end
@see EventType The EventType class for how ENCRYPTED_RECV was defined.
class_name | [R] | Returns the name for the class associated with this event. |
context | [R] | Returns the associated context object for the event. |
type | [R] | Returns the type of the event. |