Java 类org.eclipse.paho.client.mqttv3.logging.Logger 实例源码

项目:chii2mqtt    文件:SSLNetworkModule.java   
/**
 * Sets the enabled cipher suites on the underlying network socket.
 */
public void setEnabledCiphers(String[] enabledCiphers) {
    final String methodName = "setEnabledCiphers";
    this.enabledCiphers = enabledCiphers;
    if ((socket != null) && (enabledCiphers != null)) {
        if (log.isLoggable(Logger.FINE)) {
            String ciphers = "";
            for (int i = 0; i < enabledCiphers.length; i++) {
                if (i > 0) {
                    ciphers += ",";
                }
                ciphers += enabledCiphers[i];
            }
            //@TRACE 260=setEnabledCiphers ciphers={0}
            log.fine(className, methodName, "260", new Object[]{ciphers});
        }
        ((SSLSocket) socket).setEnabledCipherSuites(enabledCiphers);
    }
}
项目:hestia-engine-dev    文件:SSLNetworkModule.java   
/**
 * Sets the enabled cipher suites on the underlying network socket.
 */
public void setEnabledCiphers(String[] enabledCiphers) {
    final String methodName = "setEnabledCiphers";
    this.enabledCiphers = enabledCiphers;
    if ((socket != null) && (enabledCiphers != null)) {
        if (log.isLoggable(Logger.FINE)) {
            String ciphers = "";
            for (int i=0;i<enabledCiphers.length;i++) {
                if (i>0) {
                    ciphers+=",";
                }
                ciphers+=enabledCiphers[i];
            }
            //@TRACE 260=setEnabledCiphers ciphers={0}
            log.fine(CLASS_NAME,methodName,"260",new Object[]{ciphers});
        }
        ((SSLSocket) socket).setEnabledCipherSuites(enabledCiphers);
    }
}
项目:hestia-engine-dev    文件:LoggerFactory.java   
/**
 * Find or create a logger for a named package/class. 
 * If a logger has already been created with the given name 
 * it is returned. Otherwise a new logger is created. By default a logger
 * that uses com.oracle.util.logging will be returned.
 * 
 * @param messageCatalogName the resource bundle containing the logging messages.
 * @param loggerID  unique name to identify this logger.
 * @return a suitable Logger.
 * @throws Exception
 */
public static Logger getLogger(String messageCatalogName, String loggerID) {
    String loggerClassName = overrideloggerClassName;
    Logger logger = null;

    if (loggerClassName == null) {
        loggerClassName = DefaultloggerClassName;
    }

    // Attempt to create an instance of the logger
    try {
        logger = getLogger(loggerClassName, PropertyResourceBundle.getBundle(messageCatalogName, true), loggerID, null) ;
    } catch (MqttException e) {
        throw new IllegalStateException("Error locating the logging class: " + loggerClassName + ", " + loggerID);
    }

    // If it's still Null create an EmptyLogger
    if (null == logger) {
        logger = new EmptyLogger();
    }

    return logger;
}
项目:mqtt-websocket-jdk16-android    文件:WebSocketNetworkModule.java   
@Override
public void onOpen(Connection connection) {
    if (log.isLoggable(Logger.FINE)) {
        log.fine(CLASS_NAME, "onOpen", "116", new Object[] { uri.toString()
                + ", WebSocket CONNECTED." });
    }
}
项目:mqtt-websocket-jdk16-android    文件:WebSocketNetworkModule.java   
@Override
public void onClose(int closeCode, String message) {
    if (log.isLoggable(Logger.FINE)) {
        log.fine(CLASS_NAME, "onClose", "116",
                new Object[] { uri.toString() + ", WebSocket CLOSED." });
    }
}
项目:chii2mqtt    文件:SSLSocketFactoryFactory.java   
/**
 * Create new instance of class.
 * Constructor used by the broker.
 */
public SSLSocketFactoryFactory(Logger logger) {
    this();
    this.logger = logger;
}
项目:hestia-engine-dev    文件:SSLSocketFactoryFactory.java   
/**
 * Create new instance of class.
 * Constructor used by the broker.
 */
public SSLSocketFactoryFactory(Logger logger) {
    this();
    this.logger = logger;
}