private void initializeViaInitMethod(Handler<?> handler, Map<String, String> params, Method init) { try { init.invoke(handler, params); } catch (InvocationTargetException ex) { Throwable t = ex.getCause() != null ? ex.getCause() : ex; LogUtils.log(LOG, Level.WARNING, "INIT_METHOD_THREW_EXCEPTION", t, handler.getClass()); } catch (IllegalAccessException ex) { LOG.log(Level.SEVERE, "CANNOT_ACCESS_INIT", handler.getClass()); } }
private Socket enableCipherSuites(Socket s, Object[] logParams) { SSLSocket socket = (SSLSocket)s; if (socket == null) { LogUtils.log(LOG, Level.SEVERE, "PROBLEM_CREATING_OUTBOUND_REQUEST_SOCKET", logParams); return socket; } if (protocol != null) { String[] p = findProtocols(protocol, socket.getSupportedProtocols()); if (p != null) { socket.setEnabledProtocols(p); } } if (ciphers != null) { socket.setEnabledCipherSuites(ciphers); } return socket; } private String[] findProtocols(String p, String[] options) {
/** * Checks log level and logs * * @param logger the Logger the log to * @param level the severity level * @param message the log message */ public static void log(Logger logger, Level level, String message) { log(logger, level, message, NO_PARAMETERS); }
/** * Checks log level and logs * * @param logger the Logger the log to * @param level the severity level * @param message the log message */ public static void log(Logger logger, Level level, String message) { log(logger, level, message, NO_PARAMETERS); }
/** * Checks log level and logs * * @param logger the Logger the log to * @param level the severity level * @param message the log message */ public static void log(Logger logger, Level level, String message) { log(logger, level, message, NO_PARAMETERS); }
/** * Checks log level and logs * * @param logger the Logger the log to * @param level the severity level * @param message the log message */ public static void log(Logger logger, Level level, String message) { log(logger, level, message, NO_PARAMETERS); }
/** * Checks log level and logs * * @param logger the Logger the log to * @param level the severity level * @param message the log message */ public static void log(Logger logger, Level level, String message) { log(logger, level, message, NO_PARAMETERS); }
/** * Checks log level and logs * * @param logger the Logger the log to * @param level the severity level * @param message the log message * @param parameter the parameter to substitute into message */ public static void log(Logger logger, Level level, String message, Object parameter) { log(logger, level, message, new Object[] {parameter}); }
protected void abort(Connection con) { try { con.rollback(); } catch (SQLException ex) { LogUtils.log(LOG, Level.SEVERE, "ABORT_FAILED_MSG", ex); } }
public static Duration createDuration(String s) { try { return javax.xml.datatype.DatatypeFactory.newInstance().newDuration(s); } catch (DatatypeConfigurationException ex) { LogUtils.log(LOG, Level.SEVERE, "DATATYPE_FACTORY_INSTANTIATION_EXC", ex); } return null; } }
private static void compileRegexPatterns(List<Pattern> patterns, List<String> regexes, boolean include, Logger log) { if (regexes != null) { String msg = include ? "CIPHERSUITE_INCLUDE_FILTER" : "CIPHERSUITE_EXCLUDE_FILTER"; for (String s : regexes) { LogUtils.log(log, Level.FINE, msg, s); patterns.add(Pattern.compile(s)); } } }
private static void compileRegexPatterns(List<Pattern> patterns, List<String> regexes, boolean include, Logger log) { if (regexes != null) { String msg = include ? "CIPHERSUITE_INCLUDE_FILTER" : "CIPHERSUITE_EXCLUDE_FILTER"; for (String s : regexes) { LogUtils.log(log, Level.FINE, msg, s); patterns.add(Pattern.compile(s)); } } }
private static String[] getSystemCiphersuites(Logger log) { String jvmCipherSuites = System.getProperty(HTTPS_CIPHER_SUITES); if ((jvmCipherSuites != null) && (!jvmCipherSuites.isEmpty())) { LogUtils.log(log, Level.FINE, "CIPHERSUITES_SYSTEM_PROPERTY_SET", jvmCipherSuites); return jvmCipherSuites.split(","); } return null; }
private static String[] getSystemCiphersuites(Logger log) { String jvmCipherSuites = System.getProperty(HTTPS_CIPHER_SUITES); if ((jvmCipherSuites != null) && (!jvmCipherSuites.isEmpty())) { LogUtils.log(log, Level.FINE, "CIPHERSUITES_SYSTEM_PROPERTY_SET", jvmCipherSuites); return jvmCipherSuites.split(","); } else { return null; } }
private static String[] getSystemCiphersuites(Logger log) { String jvmCipherSuites = System.getProperty(HTTPS_CIPHER_SUITES); if ((jvmCipherSuites != null) && (!jvmCipherSuites.isEmpty())) { LogUtils.log(log, Level.FINE, "CIPHERSUITES_SYSTEM_PROPERTY_SET", jvmCipherSuites); return jvmCipherSuites.split(","); } return null; }
private void initializeViaInitMethod(Handler<?> handler, Map<String, String> params, Method init) { try { init.invoke(handler, params); } catch (InvocationTargetException ex) { Throwable t = ex.getCause() != null ? ex.getCause() : ex; LogUtils.log(LOG, Level.WARNING, "INIT_METHOD_THREW_EXCEPTION", t, handler.getClass()); } catch (IllegalAccessException ex) { LOG.log(Level.SEVERE, "CANNOT_ACCESS_INIT", handler.getClass()); } }
public Bus createBus(URL[] urls, boolean includeDefaults) { try { return finishCreatingBus(createAppContext(urls, includeDefaults)); } catch (BeansException ex) { LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null); throw new RuntimeException(ex); } }
public Bus createBus(URL[] urls, boolean includeDefaults) { try { return finishCreatingBus(createAppContext(urls, includeDefaults)); } catch (BeansException ex) { LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null); throw new RuntimeException(ex); } }
public Bus createBus(URL[] urls, boolean includeDefaults) { try { return finishCreatingBus(createAppContext(urls, includeDefaults)); } catch (BeansException ex) { LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null); throw new RuntimeException(ex); } }
public Bus createBus(URL[] urls, boolean includeDefaults) { try { return finishCreatingBus(createAppContext(urls, includeDefaults)); } catch (BeansException ex) { LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null); throw new RuntimeException(ex); } }