C++ Micro Services  2.1.1
A dynamic OSGi-like C++ service registry
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | List of all members
ServiceEvent Class Reference

An event from the Micro Services framework describing a service lifecycle change. More...

Public Types

enum  Type {
  REGISTERED, MODIFIED, UNREGISTERING, MODIFIED_ENDMATCH,
  REGISTERED, MODIFIED, UNREGISTERING, MODIFIED_ENDMATCH,
  REGISTERED, MODIFIED, UNREGISTERING, MODIFIED_ENDMATCH
}
enum  Type {
  REGISTERED, MODIFIED, UNREGISTERING, MODIFIED_ENDMATCH,
  REGISTERED, MODIFIED, UNREGISTERING, MODIFIED_ENDMATCH,
  REGISTERED, MODIFIED, UNREGISTERING, MODIFIED_ENDMATCH
}
enum  Type {
  REGISTERED, MODIFIED, UNREGISTERING, MODIFIED_ENDMATCH,
  REGISTERED, MODIFIED, UNREGISTERING, MODIFIED_ENDMATCH,
  REGISTERED, MODIFIED, UNREGISTERING, MODIFIED_ENDMATCH
}

Public Member Functions

 ServiceEvent ()
 Creates an invalid instance.
 ~ServiceEvent ()
bool IsNull () const
 Can be used to check if this ServiceEvent instance is valid, or if it has been constructed using the default constructor.
 ServiceEvent (Type type, const ServiceReferenceBase &reference)
 Creates a new service event object.
 ServiceEvent (const ServiceEvent &other)
ServiceEventoperator= (const ServiceEvent &other)
ServiceReferenceU GetServiceReference () const
 Returns a reference to the service that had a change occur in its lifecycle.
template<class S >
ServiceReference< S > GetServiceReference (InterfaceType< S >) const
Type GetType () const
 Returns the type of event.
 ServiceEvent ()
 Creates an invalid instance.
 ~ServiceEvent ()
bool IsNull () const
 Can be used to check if this ServiceEvent instance is valid, or if it has been constructed using the default constructor.
 ServiceEvent (Type type, const ServiceReferenceBase &reference)
 Creates a new service event object.
 ServiceEvent (const ServiceEvent &other)
ServiceEventoperator= (const ServiceEvent &other)
ServiceReferenceU GetServiceReference () const
 Returns a reference to the service that had a change occur in its lifecycle.
template<class S >
ServiceReference< S > GetServiceReference (InterfaceType< S >) const
Type GetType () const
 Returns the type of event.
 ServiceEvent ()
 Creates an invalid instance.
 ~ServiceEvent ()
bool IsNull () const
 Can be used to check if this ServiceEvent instance is valid, or if it has been constructed using the default constructor.
 ServiceEvent (Type type, const ServiceReferenceBase &reference)
 Creates a new service event object.
 ServiceEvent (const ServiceEvent &other)
ServiceEventoperator= (const ServiceEvent &other)
ServiceReferenceU GetServiceReference () const
 Returns a reference to the service that had a change occur in its lifecycle.
template<class S >
ServiceReference< S > GetServiceReference (InterfaceType< S >) const
Type GetType () const
 Returns the type of event.

Detailed Description

An event from the Micro Services framework describing a service lifecycle change.

ServiceEvent objects are delivered to listeners connected via ModuleContext::AddServiceListener() when a change occurs in this service's lifecycle. A type code is used to identify the event type for future extendability.

Member Enumeration Documentation

Enumerator:
REGISTERED 

This service has been registered.

This event is delivered after the service has been registered with the framework.

See Also
ModuleContext::RegisterService()
MODIFIED 

The properties of a registered service have been modified.

This event is delivered after the service properties have been modified.

See Also
ServiceRegistration::SetProperties
UNREGISTERING 

This service is in the process of being unregistered.

This event is delivered before the service has completed unregistering.

If a module is using a service that is UNREGISTERING, the module should release its use of the service when it receives this event. If the module does not release its use of the service when it receives this event, the framework will automatically release the module's use of the service while completing the service unregistration operation.

See Also
ServiceRegistration::Unregister
ModuleContext::UngetService
MODIFIED_ENDMATCH 

The properties of a registered service have been modified and the new properties no longer match the listener's filter.

This event is delivered after the service properties have been modified. This event is only delivered to listeners which were added with a non-empty filter where the filter matched the service properties prior to the modification but the filter does not match the modified service properties.

See Also
ServiceRegistration::SetProperties
REGISTERED 

This service has been registered.

This event is delivered after the service has been registered with the framework.

See Also
ModuleContext::RegisterService()
MODIFIED 

The properties of a registered service have been modified.

This event is delivered after the service properties have been modified.

See Also
ServiceRegistration::SetProperties
UNREGISTERING 

This service is in the process of being unregistered.

This event is delivered before the service has completed unregistering.

If a module is using a service that is UNREGISTERING, the module should release its use of the service when it receives this event. If the module does not release its use of the service when it receives this event, the framework will automatically release the module's use of the service while completing the service unregistration operation.

See Also
ServiceRegistration::Unregister
ModuleContext::UngetService
MODIFIED_ENDMATCH 

The properties of a registered service have been modified and the new properties no longer match the listener's filter.

This event is delivered after the service properties have been modified. This event is only delivered to listeners which were added with a non-empty filter where the filter matched the service properties prior to the modification but the filter does not match the modified service properties.

See Also
ServiceRegistration::SetProperties
REGISTERED 

This service has been registered.

This event is delivered after the service has been registered with the framework.

See Also
ModuleContext::RegisterService()
MODIFIED 

The properties of a registered service have been modified.

This event is delivered after the service properties have been modified.

See Also
ServiceRegistration::SetProperties
UNREGISTERING 

This service is in the process of being unregistered.

This event is delivered before the service has completed unregistering.

If a module is using a service that is UNREGISTERING, the module should release its use of the service when it receives this event. If the module does not release its use of the service when it receives this event, the framework will automatically release the module's use of the service while completing the service unregistration operation.

See Also
ServiceRegistration::Unregister
ModuleContext::UngetService
MODIFIED_ENDMATCH 

The properties of a registered service have been modified and the new properties no longer match the listener's filter.

This event is delivered after the service properties have been modified. This event is only delivered to listeners which were added with a non-empty filter where the filter matched the service properties prior to the modification but the filter does not match the modified service properties.

See Also
ServiceRegistration::SetProperties
Enumerator:
REGISTERED 

This service has been registered.

This event is delivered after the service has been registered with the framework.

See Also
ModuleContext::RegisterService()
MODIFIED 

The properties of a registered service have been modified.

This event is delivered after the service properties have been modified.

See Also
ServiceRegistration::SetProperties
UNREGISTERING 

This service is in the process of being unregistered.

This event is delivered before the service has completed unregistering.

If a module is using a service that is UNREGISTERING, the module should release its use of the service when it receives this event. If the module does not release its use of the service when it receives this event, the framework will automatically release the module's use of the service while completing the service unregistration operation.

See Also
ServiceRegistration::Unregister
ModuleContext::UngetService
MODIFIED_ENDMATCH 

The properties of a registered service have been modified and the new properties no longer match the listener's filter.

This event is delivered after the service properties have been modified. This event is only delivered to listeners which were added with a non-empty filter where the filter matched the service properties prior to the modification but the filter does not match the modified service properties.

See Also
ServiceRegistration::SetProperties
REGISTERED 

This service has been registered.

This event is delivered after the service has been registered with the framework.

See Also
ModuleContext::RegisterService()
MODIFIED 

The properties of a registered service have been modified.

This event is delivered after the service properties have been modified.

See Also
ServiceRegistration::SetProperties
UNREGISTERING 

This service is in the process of being unregistered.

This event is delivered before the service has completed unregistering.

If a module is using a service that is UNREGISTERING, the module should release its use of the service when it receives this event. If the module does not release its use of the service when it receives this event, the framework will automatically release the module's use of the service while completing the service unregistration operation.

See Also
ServiceRegistration::Unregister
ModuleContext::UngetService
MODIFIED_ENDMATCH 

The properties of a registered service have been modified and the new properties no longer match the listener's filter.

This event is delivered after the service properties have been modified. This event is only delivered to listeners which were added with a non-empty filter where the filter matched the service properties prior to the modification but the filter does not match the modified service properties.

See Also
ServiceRegistration::SetProperties
REGISTERED 

This service has been registered.

This event is delivered after the service has been registered with the framework.

See Also
ModuleContext::RegisterService()
MODIFIED 

The properties of a registered service have been modified.

This event is delivered after the service properties have been modified.

See Also
ServiceRegistration::SetProperties
UNREGISTERING 

This service is in the process of being unregistered.

This event is delivered before the service has completed unregistering.

If a module is using a service that is UNREGISTERING, the module should release its use of the service when it receives this event. If the module does not release its use of the service when it receives this event, the framework will automatically release the module's use of the service while completing the service unregistration operation.

See Also
ServiceRegistration::Unregister
ModuleContext::UngetService
MODIFIED_ENDMATCH 

The properties of a registered service have been modified and the new properties no longer match the listener's filter.

This event is delivered after the service properties have been modified. This event is only delivered to listeners which were added with a non-empty filter where the filter matched the service properties prior to the modification but the filter does not match the modified service properties.

See Also
ServiceRegistration::SetProperties
Enumerator:
REGISTERED 

This service has been registered.

This event is delivered after the service has been registered with the framework.

See Also
ModuleContext::RegisterService()
MODIFIED 

The properties of a registered service have been modified.

This event is delivered after the service properties have been modified.

See Also
ServiceRegistration::SetProperties
UNREGISTERING 

This service is in the process of being unregistered.

This event is delivered before the service has completed unregistering.

If a module is using a service that is UNREGISTERING, the module should release its use of the service when it receives this event. If the module does not release its use of the service when it receives this event, the framework will automatically release the module's use of the service while completing the service unregistration operation.

See Also
ServiceRegistration::Unregister
ModuleContext::UngetService
MODIFIED_ENDMATCH 

The properties of a registered service have been modified and the new properties no longer match the listener's filter.

This event is delivered after the service properties have been modified. This event is only delivered to listeners which were added with a non-empty filter where the filter matched the service properties prior to the modification but the filter does not match the modified service properties.

See Also
ServiceRegistration::SetProperties
REGISTERED 

This service has been registered.

This event is delivered after the service has been registered with the framework.

See Also
ModuleContext::RegisterService()
MODIFIED 

The properties of a registered service have been modified.

This event is delivered after the service properties have been modified.

See Also
ServiceRegistration::SetProperties
UNREGISTERING 

This service is in the process of being unregistered.

This event is delivered before the service has completed unregistering.

If a module is using a service that is UNREGISTERING, the module should release its use of the service when it receives this event. If the module does not release its use of the service when it receives this event, the framework will automatically release the module's use of the service while completing the service unregistration operation.

See Also
ServiceRegistration::Unregister
ModuleContext::UngetService
MODIFIED_ENDMATCH 

The properties of a registered service have been modified and the new properties no longer match the listener's filter.

This event is delivered after the service properties have been modified. This event is only delivered to listeners which were added with a non-empty filter where the filter matched the service properties prior to the modification but the filter does not match the modified service properties.

See Also
ServiceRegistration::SetProperties
REGISTERED 

This service has been registered.

This event is delivered after the service has been registered with the framework.

See Also
ModuleContext::RegisterService()
MODIFIED 

The properties of a registered service have been modified.

This event is delivered after the service properties have been modified.

See Also
ServiceRegistration::SetProperties
UNREGISTERING 

This service is in the process of being unregistered.

This event is delivered before the service has completed unregistering.

If a module is using a service that is UNREGISTERING, the module should release its use of the service when it receives this event. If the module does not release its use of the service when it receives this event, the framework will automatically release the module's use of the service while completing the service unregistration operation.

See Also
ServiceRegistration::Unregister
ModuleContext::UngetService
MODIFIED_ENDMATCH 

The properties of a registered service have been modified and the new properties no longer match the listener's filter.

This event is delivered after the service properties have been modified. This event is only delivered to listeners which were added with a non-empty filter where the filter matched the service properties prior to the modification but the filter does not match the modified service properties.

See Also
ServiceRegistration::SetProperties

Constructor & Destructor Documentation

ServiceEvent::ServiceEvent ( )

Creates an invalid instance.

ServiceEvent::~ServiceEvent ( )
ServiceEvent::ServiceEvent ( Type  type,
const ServiceReferenceBase reference 
)

Creates a new service event object.

Parameters
typeThe event type.
referenceA ServiceReference object to the service that had a lifecycle change.
ServiceEvent::ServiceEvent ( const ServiceEvent other)
ServiceEvent::ServiceEvent ( )

Creates an invalid instance.

ServiceEvent::~ServiceEvent ( )
ServiceEvent::ServiceEvent ( Type  type,
const ServiceReferenceBase reference 
)

Creates a new service event object.

Parameters
typeThe event type.
referenceA ServiceReference object to the service that had a lifecycle change.
ServiceEvent::ServiceEvent ( const ServiceEvent other)
ServiceEvent::ServiceEvent ( )

Creates an invalid instance.

ServiceEvent::~ServiceEvent ( )
ServiceEvent::ServiceEvent ( Type  type,
const ServiceReferenceBase reference 
)

Creates a new service event object.

Parameters
typeThe event type.
referenceA ServiceReference object to the service that had a lifecycle change.
ServiceEvent::ServiceEvent ( const ServiceEvent other)

Member Function Documentation

ServiceReferenceU ServiceEvent::GetServiceReference ( ) const

Returns a reference to the service that had a change occur in its lifecycle.

This reference is the source of the event.

Returns
Reference to the service that had a lifecycle change.
ServiceReferenceU ServiceEvent::GetServiceReference ( ) const

Returns a reference to the service that had a change occur in its lifecycle.

This reference is the source of the event.

Returns
Reference to the service that had a lifecycle change.
ServiceReferenceU ServiceEvent::GetServiceReference ( ) const

Returns a reference to the service that had a change occur in its lifecycle.

This reference is the source of the event.

Returns
Reference to the service that had a lifecycle change.
template<class S >
ServiceReference<S> ServiceEvent::GetServiceReference ( InterfaceType< S >  ) const
inline
template<class S >
ServiceReference<S> ServiceEvent::GetServiceReference ( InterfaceType< S >  ) const
inline
template<class S >
ServiceReference<S> ServiceEvent::GetServiceReference ( InterfaceType< S >  ) const
inline
Type ServiceEvent::GetType ( ) const

Returns the type of event.

The event type values are:

Returns
Type of service lifecycle change.
Type ServiceEvent::GetType ( ) const

Returns the type of event.

The event type values are:

Returns
Type of service lifecycle change.
Type ServiceEvent::GetType ( ) const

Returns the type of event.

The event type values are:

Returns
Type of service lifecycle change.
bool ServiceEvent::IsNull ( ) const

Can be used to check if this ServiceEvent instance is valid, or if it has been constructed using the default constructor.

Returns
true if this event object is valid, false otherwise.
bool ServiceEvent::IsNull ( ) const

Can be used to check if this ServiceEvent instance is valid, or if it has been constructed using the default constructor.

Returns
true if this event object is valid, false otherwise.
bool ServiceEvent::IsNull ( ) const

Can be used to check if this ServiceEvent instance is valid, or if it has been constructed using the default constructor.

Returns
true if this event object is valid, false otherwise.
ServiceEvent& ServiceEvent::operator= ( const ServiceEvent other)
ServiceEvent& ServiceEvent::operator= ( const ServiceEvent other)
ServiceEvent& ServiceEvent::operator= ( const ServiceEvent other)