Class: BPS::Publisher::Abstract
- Inherits:
-
Object
- Object
- BPS::Publisher::Abstract
- Defined in:
- lib/bps/publisher/abstract.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Topic
Instance Method Summary collapse
-
#close ⇒ Object
Close the publisher.
-
#initialize ⇒ Abstract
constructor
A new instance of Abstract.
-
#topic(_name) ⇒ Object
Retrieve a topic handle.
Constructor Details
#initialize ⇒ Abstract
Returns a new instance of Abstract.
16 17 18 19 |
# File 'lib/bps/publisher/abstract.rb', line 16 def initialize @uuid = SecureRandom.uuid ObjectSpace.define_finalizer(@uuid, proc { close }) end |
Instance Method Details
#close ⇒ Object
Close the publisher.
28 29 30 |
# File 'lib/bps/publisher/abstract.rb', line 28 def close ObjectSpace.undefine_finalizer(@uuid) end |
#topic(_name) ⇒ Object
Retrieve a topic handle.
23 24 25 |
# File 'lib/bps/publisher/abstract.rb', line 23 def topic(_name) raise 'not implemented' end |