public static SslContext createNettySslContext(boolean allowInsecureConnection, String trustCertsFilePath, String certFilePath, String keyFilePath) throws GeneralSecurityException, SSLException, FileNotFoundException { X509Certificate[] certificates = loadCertificatesFromPemFile(certFilePath); PrivateKey privateKey = loadPrivateKeyFromPemFile(keyFilePath); return createNettySslContext(allowInsecureConnection, trustCertsFilePath, certificates, privateKey); }
@Override protected ObjectMapper initialValue() throws Exception { return ObjectMapperFactory.create(); } };
public static SSLContext createSslContext(boolean allowInsecureConnection, String trustCertsFilePath, String certFilePath, String keyFilePath) throws GeneralSecurityException { X509Certificate[] trustCertificates = loadCertificatesFromPemFile(trustCertsFilePath); X509Certificate[] certificates = loadCertificatesFromPemFile(certFilePath); PrivateKey privateKey = loadPrivateKeyFromPemFile(keyFilePath); return createSslContext(allowInsecureConnection, trustCertificates, certificates, privateKey); }
public static ObjectMapper jsonMapper() { return ObjectMapperFactory.getThreadLocal(); }
public AuthenticationDataTls(String certFilePath, String keyFilePath) throws KeyManagementException { if (certFilePath == null) { throw new IllegalArgumentException("certFilePath must not be null"); } if (keyFilePath == null) { throw new IllegalArgumentException("keyFilePath must not be null"); } certificates = SecurityUtility.loadCertificatesFromPemFile(certFilePath); privateKey = SecurityUtility.loadPrivateKeyFromPemFile(keyFilePath); }
public static SSLContext createSslContext(boolean allowInsecureConnection, Certificate[] trustCertificates) throws GeneralSecurityException { return createSslContext(allowInsecureConnection, trustCertificates, (Certificate[]) null, (PrivateKey) null); }
public String getEncodedLocalName() { return Codec.encode(localName); }
public static SslContext createNettySslContext(boolean allowInsecureConnection, String trustCertsFilePath) throws GeneralSecurityException, SSLException, FileNotFoundException { return createNettySslContext(allowInsecureConnection, trustCertsFilePath, (Certificate[]) null, (PrivateKey) null); }
/** * Converts String to Double. * * @param value * The String to be converted. * @return The converted Double value. */ public static Double stringToDouble(String val) { return Double.valueOf(trim(val)); }
public PersistentMessageFinder(String topicName, ManagedCursor cursor) { this.topicName = topicName; this.cursor = cursor; this.subName = Codec.decode(cursor.getName()); }
@Override public LoadReport deserialize(String key, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, LoadReport.class); } };
public JacksonConfigurator() { mapper = ObjectMapperFactory.create(); }
/** * Converts String to float. * * @param value * The String to be converted. * @return The converted Double value. */ public static Float stringToFloat(String val) { return Float.valueOf(trim(val)); }
@Override public ClusterData deserialize(String path, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, ClusterData.class); } };
/** * Converts String to Integer. * * @param value * The String to be converted. * @return The converted Integer value. */ public static Integer stringToInteger(String val) { return Integer.valueOf(trim(val)); }
@Override public Map<String, String> deserialize(String key, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, HashMap.class); } };
@Override public NamespaceEphemeralData deserialize(String path, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, NamespaceEphemeralData.class); } };
@Override public Policies deserialize(String path, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, Policies.class); } };
@Override public LoadReport deserialize(String key, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, LoadReport.class); } };
@Override public PropertyAdmin deserialize(String path, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, PropertyAdmin.class); } };