copland

The copland package is the standard package defined by the Copland distribution. It includes the core services and interceptors, such as the BuilderFactory and the LoggingInterceptor.

Service Points

Configuration Points

Schemas

Service Points

ApplicationDefaults (singleton)

The service point that provides access to the ApplicationDefaults configuration point.

Implementor

BuilderFactory (singleton)

Used to construct a service from a class name and optional constructor parameters and properties.

Implementor

copland/impl/builder-factory/Copland::Implementation::BuilderFactory

Schema

class [string] (required)
The path description of the class to instantiate. This takes the form "path/to/file/Full::Class::Name". Then, "require" will be invoked on the "path/to/file" portion, and the class itself will then be resolved. If the class includes the Singleton module, the singleton instance will be correctly resolved; in this case, it is an error to specify construction parameters.
initialize-method [string]
This describes the name of the method to invoke when the service has been completely instantiated (and all properties wired into it). This defaults to "initialize_service". If the method does not exist, then nothing is invoked.
invoke [hash]
A hash of method-name/parameter pairs, where the value of each pair is an array of parameters to pass to the method. These methods will be invoked in no particular order, after all properties have been assigned.
parameters [array]
A list of values that should be passed (in order) to the constructor of the class. It is illegal to specify this value if the class includes the Singleton module.
properties [hash]
A hash of property-name/value pairs that describe the properties to set on the instantiated object. Assignment occurs as follows: first, a setter is searched for, either "name=" or "set_name". If one is found, it is used to set the property. If no such setter exists, the property is set directly using "instance_variable_set".

FactoryDefaults (singleton)

The service point that provides access to the FactoryDefaults configuration point.

Implementor

LogFactory (singleton)

The LogFactory service provides log instances on demand. It is always an identity for the log factory instance owned by the registry.

Implementor

Copland::LogFactory instance

LoggingInterceptor (singleton)

An interceptor that adds logging to a service. Log entries are created for all method calls (on enter and exit) and for any raised exceptions. By default, all methods implemented by the service are included for logging, and may only be excluded by using the 'exclude' element. Anything matching any of the exclusion patterns will not be logged, unless it also matches an 'include' pattern.

Implementor

copland/impl/logging-interceptor/Copland::Implementation::LoggingInterceptorFactory

Schema

copland.IncludeExcludeSchema

Registry (singleton)

This service is intended to allow services to obtain a reference to the registry which created them. In general, however, services should never need to reference the registry directly; instead, they should rely on their descriptors to specify their dependencies. There are a few exceptions to this rule, though, and it is for those exceptions that this service is made available.

Implementor

Copland::Registry instance

Startup (singleton)

This is a service that will be automatically instantiated when the registry is initialized. Once invoked, it inspects the Startup configuration point to determine which other services to load. These clients will be ordered based on their 'before' and 'after' preferences, and then all enabled services will be started.

Implementor

SymbolSourceManager (singleton)

The service that manages all contributed symbol sources, and which may be queried to obtain values known by any of them.

Implementor

Configuration Points

ApplicationDefaults (map)

This symbol source configuration point allows packages to override factory default values (see the FactoryDefaults configuration point).

FactoryDefaults (map)

This symbol source configuration point allows packages to define "factory defaults" for various substitution symbols that they export.

Startup (list)

This is the data source for the Startup service. This allows services to register themselves to be automatically started when the registry has finished initializing. Services may also register their preferred ordering for startup.

Schema

copland.ClientDefinition

SymbolSources (list)

This is a list of services or objects that can be queried to provide symbols. Packages may contribute additional symbol sources to this list. Additionally, the sources may be given an explicit order in which they will be queried for symbols, allowing some sources to take precendence over others.

Schema

source [any] (required)
The implementor of the symbol source that is being contributed. It must be the name of a class, or an instance of a service.
after [array]
A list of symbol sources to be queried before this source.
before [array]
A list of symbol sources to be queried after this source.
name [string]
The name given to this symbol source. This allows it to be referenced in other sources' before and after lists.

Schemas

ClientDefinition

service [string] (required)
The (full) name of the client service.
after [array]
A list of other service names that should be notified before this service.
before [array]
A list of other service names that should be notified after this service.
enabled [boolean]
Whether or not the service should be notified.

IncludeExcludeSchema

This is a schema that may be used by any service that wishes to incorporate "include/exclude" functionality into itself.

exclude [array]
A list of special expressions that define which methods are excluded from the operation. The format for these expressions is described under the 'include' element.
include [array]
A list of special expressions that define which methods are included in the operation. These expressions take the format "pattern" (where pattern in a regular expression that should match the method's name), or "pattern(arity)", where arity is either a positive integer (indicating that only methods with that arity match), or a positive integer preceded by a comparison operator (<, =, or >).
Generated by Copland's Packrat documentation extractor on Mon Oct 11 20:22:31 MDT 2004