/**
* Return true if the notification was sent successfully, false otherwise.
* @param type
* @param message
* @return true if the notification succeeded
*/
public boolean notify(final String type, String message) {
try {
Notification n = new Notification(
type,
this,
sequence.incrementAndGet(),
System.currentTimeMillis(),
"["+type+"] "+message);
sendNotification(n);
for (NotificationListener listener : listeners) {
listener.handleNotification(n,this);
}
return true;
}catch (Exception x) {
if (log.isDebugEnabled()) {
log.debug("Notify failed. Type="+type+"; Message="+message,x);
}
return false;
}
}
ConnectionPool.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:tomcat7
作者:
评论列表
文章目录