Methods
Classes and Modules
Module Net::SSH::Service::AgentForwardModule Net::SSH::Service::Forward
Module Net::SSH::Service::Process
Module Net::SSH::Service::Shell
Public Instance methods
Register all standard SSH services.
[ show source ]
# File lib/net/ssh/service/services.rb, line 24
24: def register_services( container )
25:
26: # Define the hash that will be used to record the registered services.
27: # If the hash already exists, don't redefine it.
28: unless container.knows_key?( :services )
29: container.define.services { Hash.new }
30: end
31:
32: # Register the services in their own namespace.
33: container.namespace_define :service do |ns|
34: ns.require "net/ssh/service/forward/services", "#{self}::Forward"
35: ns.require "net/ssh/service/process/services", "#{self}::Process"
36: ns.require "net/ssh/service/shell/services", "#{self}::Shell"
37: ns.require "net/ssh/service/agentforward/services", "#{self}::AgentForward"
38: end
39:
40: # Add the services to the services hash.
41: container.services[ :forward ] = container.service.forward.driver
42: container.services[ :process ] = container.service.process.driver
43: container.services[ :shell ] = container.service.shell.driver
44: container.services[ :agentforward ] = container.service.agentforward.driver
45:
46: # Register the external services and add them to the collection of
47: # known services.
48: EXTERNAL_SERVICES.each do |name, block|
49: container.service.register( name,
50: :model => :singleton_deferred,
51: &block )
52: container.services[ name ] = container.service[ name ]
53: end
54:
55: end