- All Implemented Interfaces:
- org.wso2.carbon.utils.Axis2ConfigurationContextObserver
public class DiscoveryAxis2ConfigurationContextObserver
extends org.wso2.carbon.utils.AbstractAxis2ConfigurationContextObserver
This observer implementation listens for configuration context creation and termination
events and enables/disables WS-Discovery for individual tenants as necessary. When a tenant
configuration context is created this observer checks whether WS-Discovery should be enabled
for that tenant by looking at a tenant AxisConfiguration parameter. If discovery should
be enabled, it will initiate a TargetServiceObserver instance and register with the tenant
AxisConfiguration. This will cause necessary HELLO messages to be sent for all the services
already deployed in the respective tenant AxisConfiguration.
Similarly when a tenant is terminated, it will look whether discovery is
enabled in it, and send out WS-Discovery BYE messages for all the deployed services. Then
it will wrap it up by disengaging the TargetServiceObserver from the tenant AxisConfiguration.