Class: BPS::Publisher::Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/bps/publisher/abstract.rb

Direct Known Subclasses

InMem

Defined Under Namespace

Classes: Topic

Instance Method Summary collapse

Constructor Details

#initializeAbstract

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

#closeObject

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