Module OpenWFE::ServiceMixin
In: lib/openwfe/service.rb

Most of the functionalities of an OpenWFEru service are implemented here as a mixin. It‘s then easy to either extend Service or include ServiceMixin, to compose an OpenWFEru service class.

Methods

service_init   stop  

Included Modules

Contextual Logging

Attributes

service_name  [RW]  The name of the service

Public Instance methods

Inits the service by setting the service name and the application context. Does also bind the service under the service name in the application context.

[Source]

    # File lib/openwfe/service.rb, line 64
64:         def service_init (service_name, application_context)
65: 
66:             @service_name = service_name
67:             @application_context = application_context
68: 
69:             @application_context[@service_name.to_s] = self \
70:                 if @service_name and @application_context
71:         end

Some services (like the scheduler one for example) need to free some resources upon stopping. This can be achieved by overwriting this method.

[Source]

    # File lib/openwfe/service.rb, line 78
78:         def stop
79:         end

[Validate]