Class | Orbjson::System |
In: |
lib/orbjson.rb
|
Parent: | Object |
The System class holds the core broker methods. It is reponsible for registering server-side classes, sending a list of available services to the client, and connecting JSON-RPC requests with registered services
The System object is initialized by calling init and passing in a mapping of files and classes implementing services.
You can configure the Orbjson services list in a few ways, passing detials into the init method.
Well, three, really:
1. Pass in a path to a local YAML file; the path must begin with 'file://' For example: cfg = 'file://config.yaml' System.init( cfg ) 2. Pass in some YAML: cfg = 'services/sample: - Details' System.init( cfg ) 3. Pass in some an actual Hash object: cfg = { 'services/sample' => ['Details'] } System.init( cfg ) The hash (however you express it) consists of 'require' paths mapped to arrays of classes to instantiate.
Returns a list of registerd services. Wraps a call to System.list_methods. The format of each listed service name is className.method It was added as a conveience for client code that uses the archaic camelCase method naming convention found in 2oth C. programming languages