envisage.service_registry module

The service registry.

exception envisage.service_registry.NoSuchServiceError[source]

Bases: Exception

Raised when a required service is not found.

class envisage.service_registry.ServiceRegistry[source]

Bases: HasTraits

The service registry.

get_required_service(protocol, query='', minimize='', maximize='')[source]

Return the service that matches the specified query.

Raise a ‘NoSuchServiceError’ exception if no such service exists.

get_service(protocol, query='', minimize='', maximize='')[source]

Return at most one service that matches the specified query.

get_service_from_id(service_id)[source]

Return the service with the specified id.

get_service_properties(service_id)[source]

Return the dictionary of properties associated with a service.

get_services(protocol, query='', minimize='', maximize='')[source]

Return all services that match the specified query.

register_service(protocol, obj, properties=None)[source]

Register a service.

registered = Event

An event that is fired when a service is registered.

set_service_properties(service_id, properties)[source]

Set the dictionary of properties associated with a service.

unregister_service(service_id)[source]

Unregister a service.

unregistered = Event

An event that is fired when a service is unregistered.