Class: Dor::Event::Client
- Inherits:
-
Object
- Object
- Dor::Event::Client
- Includes:
- Singleton
- Defined in:
- lib/dor/event/client.rb,
lib/dor/event/client/version.rb,
lib/dor/event/client/create_operation.rb,
lib/dor/event/client/rabbit_channel_factory.rb
Overview
Client for event services.
Defined Under Namespace
Classes: CreateOperation, Error, RabbitChannelFactory
Constant Summary collapse
- VERSION =
'1.0.0'
Instance Attribute Summary collapse
-
#channel ⇒ Object
writeonly
Sets the attribute channel.
-
#hostname ⇒ Object
writeonly
Sets the attribute hostname.
-
#password ⇒ Object
writeonly
Sets the attribute password.
-
#username ⇒ Object
writeonly
Sets the attribute username.
-
#vhost ⇒ Object
writeonly
Sets the attribute vhost.
Class Method Summary collapse
Instance Attribute Details
#channel=(value) ⇒ Object
Sets the attribute channel
42 43 44 |
# File 'lib/dor/event/client.rb', line 42 def channel=(value) @channel = value end |
#hostname=(value) ⇒ Object
Sets the attribute hostname
42 43 44 |
# File 'lib/dor/event/client.rb', line 42 def hostname=(value) @hostname = value end |
#password=(value) ⇒ Object
Sets the attribute password
42 43 44 |
# File 'lib/dor/event/client.rb', line 42 def password=(value) @password = value end |
#username=(value) ⇒ Object
Sets the attribute username
42 43 44 |
# File 'lib/dor/event/client.rb', line 42 def username=(value) @username = value end |
#vhost=(value) ⇒ Object
Sets the attribute vhost
42 43 44 |
# File 'lib/dor/event/client.rb', line 42 def vhost=(value) @vhost = value end |
Class Method Details
.configure(hostname:, vhost:, username:, password:) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/dor/event/client.rb', line 27 def configure(hostname:, vhost:, username:, password:) instance.hostname = hostname instance.vhost = vhost instance.username = username instance.password = password # Force channel to be re-established when `.configure` is called instance.channel = nil self end |