Class | Qpid::Proton::Event::EventType |
In: |
lib/event/event_type.rb
|
Parent: | Object |
Manages the association between an Event and the method which should process on the context object associated with an occurance of the event.
Each type is identified by a unique type value.
@example
# SCENARIO: A part of an application handles extracting and decrypting # data received from a remote endpoint. # # An EventType is created to notify handlers that such a # situation has occurred. ENCRYPTED_RECV = 10000 # the unique constant value for the event # create a new event type which, when it occurs, invokes a method # named :on_encrypted_data when a handler is notified of its occurrance Qpid::Proton::Event::ENCRYPTED_RECV = Qpid::Proton::Event::EventType.new(ENCRYPTED_RECV, :on_encrypted_data)
@see EventBase EventBase for the rest of this example. @see Qpid::Proton::Event::Event The Event class for more details on events.
method | [R] | The method to invoke on any potential handler. |
number | [R] |