Class: Dizby::AbstractServer
- Inherits:
-
Object
- Object
- Dizby::AbstractServer
show all
- Extended by:
- Configurable
- Defined in:
- lib/dizby/server/abstract.rb
Instance Attribute Summary collapse
-
#log
readonly
Returns the value of attribute log.
Instance Method Summary
collapse
config_accessor, config_reader, config_writer
Constructor Details
#initialize(config, &log_transform) ⇒ AbstractServer
Returns a new instance of AbstractServer.
17
18
19
20
|
# File 'lib/dizby/server/abstract.rb', line 17
def initialize(config, &log_transform)
@config = config
@log = Dizby::Logger.new(config[:log] || {}, &log_transform)
end
|
Instance Attribute Details
#log
Returns the value of attribute log.
22
23
24
|
# File 'lib/dizby/server/abstract.rb', line 22
def log
@log
end
|
Instance Method Details
#alive? ⇒ Boolean
35
36
37
|
# File 'lib/dizby/server/abstract.rb', line 35
def alive?
true
end
|
#make_distributed(obj, error)
39
40
41
42
43
44
45
46
|
# File 'lib/dizby/server/abstract.rb', line 39
def make_distributed(obj, error)
if error
RemoteDistributedError.new(obj)
else
log.debug("making distributed: #{obj.inspect}")
DistributedObject.new(obj, self)
end
end
|
#shutdown
33
|
# File 'lib/dizby/server/abstract.rb', line 33
def shutdown; end
|
#spawn_on(command, uri)
29
30
31
|
# File 'lib/dizby/server/abstract.rb', line 29
def spawn_on(command, uri)
ProtocolManager.spawn_server(self, command, uri)
end
|