Skip to content

Instantly share code, notes, and snippets.

@johndemic
Created July 23, 2011 18:06
Show Gist options
  • Save johndemic/1101697 to your computer and use it in GitHub Desktop.
Save johndemic/1101697 to your computer and use it in GitHub Desktop.
public void fireNotification(ServerNotification notification)
{
if (!disposed.get())
{
notification.setMuleContext(muleContext);
if (notification instanceof BlockingServerEvent)
{
notifyListeners(notification);
}
else
{
try
{
eventQueue.put(notification);
}
catch (InterruptedException e)
{
if (!disposed.get())
{
logger.error("Failed to queue notification: " + notification, e);
}
}
}
}
else
{
logger.warn("Notification not enqueued after ServerNotificationManager disposal: " + notification);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment