JMXConsumer.java 文件源码

java
阅读 20 收藏 0 点赞 0 评论 0

项目:Camel 作者:
@Override
public void handleNotification(Notification notification, Object handback) {
    JMXConnectionNotification connectionNotification = (JMXConnectionNotification)notification;
    // only reset the connection if the notification is for the connection from this endpoint
    if (!connectionNotification.getConnectionId().equals(mConnectionId)) {
        return;
    }
    if (connectionNotification.getType().equals(JMXConnectionNotification.NOTIFS_LOST) 
                || connectionNotification.getType().equals(JMXConnectionNotification.CLOSED) 
                || connectionNotification.getType().equals(JMXConnectionNotification.FAILED)) {
        LOG.warn("Lost JMX connection for : {}", URISupport.sanitizeUri(mJmxEndpoint.getEndpointUri()));
        if (mJmxEndpoint.getReconnectOnConnectionFailure()) {
            scheduleReconnect();
        } else {
            LOG.warn("The JMX consumer will not be reconnected.  Use 'reconnectOnConnectionFailure' to "
                    + "enable reconnections.");
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号