{
muleContext.registerListener(l);
}
catch (NotificationException e)
{
throw new InitialisationException(e, this);
}
listeners.add(l);
}
if (!ignoreModelNotifications)
{
ServerNotificationListener<ModelNotification> l
= new ModelNotificationListener<ModelNotification>()
{
public void onNotification(ModelNotification notification)
{
logEvent(notification);
}
};
try
{
muleContext.registerListener(l);
}
catch (NotificationException e)
{
throw new InitialisationException(e, this);
}
listeners.add(l);
}
if (!ignoreComponentNotifications)
{
ServerNotificationListener<ServiceNotification> l
= new ServiceNotificationListener<ServiceNotification>()
{
public void onNotification(ServiceNotification notification)
{
logEvent(notification);
}
};
try
{
muleContext.registerListener(l);
}
catch (NotificationException e)
{
throw new InitialisationException(e, this);
}
listeners.add(l);
}
if (!ignoreSecurityNotifications)
{
ServerNotificationListener<SecurityNotification> l
= new SecurityNotificationListener<SecurityNotification>()
{
public void onNotification(SecurityNotification notification)
{
logEvent(notification);
}
};
try
{
muleContext.registerListener(l);
}
catch (NotificationException e)
{
throw new InitialisationException(e, this);
}
listeners.add(l);
}
if (!ignoreManagementNotifications)
{
ServerNotificationListener<ManagementNotification> l
= new ManagementNotificationListener<ManagementNotification>()
{
public void onNotification(ManagementNotification notification)
{
logEvent(notification);
}
};
try
{
muleContext.registerListener(l);
}
catch (NotificationException e)
{
throw new InitialisationException(e, this);
}
listeners.add(l);
}
if (!ignoreCustomNotifications)
{
ServerNotificationListener l = new CustomNotificationListener()
{
public void onNotification(ServerNotification notification)
{
logEvent(notification);
}
};
try
{
muleContext.registerListener(l);
}
catch (NotificationException e)
{
throw new InitialisationException(e, this);
}
listeners.add(l);
}
if (!ignoreConnectionNotifications)
{
ServerNotificationListener<ConnectionNotification> l
= new ConnectionNotificationListener<ConnectionNotification>()
{
public void onNotification(ConnectionNotification notification)
{
logEvent(notification);
}
};
try
{
muleContext.registerListener(l);
}
catch (NotificationException e)
{
throw new InitialisationException(e, this);
}
listeners.add(l);
}
if (!ignoreMessageNotifications && !ignoreEndpointMessageNotifications)
{
ServerNotificationListener<EndpointMessageNotification> l =
new EndpointMessageNotificationListener<EndpointMessageNotification>()
{
public void onNotification(EndpointMessageNotification notification)
{
logEvent(notification);
}
};
try
{
muleContext.registerListener(l);
}
catch (NotificationException e)
{
throw new InitialisationException(e, this);
}
listeners.add(l);
}
if (!ignoreMessageNotifications && !ignoreComponentMessageNotifications)
{
ServerNotificationListener<ComponentMessageNotification> l =
new ComponentMessageNotificationListener<ComponentMessageNotification>()
{
public void onNotification(ComponentMessageNotification notification)
{
logEvent(notification);
}
};
try
{
muleContext.registerListener(l);
}
catch (NotificationException e)
{
throw new InitialisationException(e, this);
}
listeners.add(l);
}
}