protected SocketInterceptorConfig parseSocketInterceptorConfig(final Node node) { SocketInterceptorConfig socketInterceptorConfig = new SocketInterceptorConfig(); final NamedNodeMap atts = node.getAttributes(); final Node enabledNode = atts.getNamedItem("enabled"); final boolean enabled = enabledNode != null && getBooleanValue(getTextContent(enabledNode).trim()); socketInterceptorConfig.setEnabled(enabled); for (Node n : childElements(node)) { final String nodeName = cleanNodeName(n); if ("class-name".equals(nodeName)) { socketInterceptorConfig.setClassName(getTextContent(n).trim()); } else if ("properties".equals(nodeName)) { fillProperties(n, socketInterceptorConfig.getProperties()); } } return socketInterceptorConfig; }
protected SocketInterceptorConfig parseSocketInterceptorConfig(final Node node) { SocketInterceptorConfig socketInterceptorConfig = new SocketInterceptorConfig(); final NamedNodeMap atts = node.getAttributes(); final Node enabledNode = atts.getNamedItem("enabled"); final boolean enabled = enabledNode != null && getBooleanValue(getTextContent(enabledNode).trim()); socketInterceptorConfig.setEnabled(enabled); for (Node n : childElements(node)) { final String nodeName = cleanNodeName(n); if ("class-name".equals(nodeName)) { socketInterceptorConfig.setClassName(getTextContent(n).trim()); } else if ("properties".equals(nodeName)) { fillProperties(n, socketInterceptorConfig.getProperties()); } } return socketInterceptorConfig; }
private static ClientConfig createClientConfig() { ClientConfig clientConfig = new ClientConfig(); clientConfig.setLicenseKey(ENTERPRISE_LICENSE_KEY); SocketInterceptorConfig interceptorConfig = new SocketInterceptorConfig(); interceptorConfig.setEnabled(true).setClassName(MySocketInterceptor.class.getName()); clientConfig.getNetworkConfig().setSocketInterceptorConfig(interceptorConfig); return clientConfig; }
private static Config createConfig() { Config config = new Config(); config.setLicenseKey(ENTERPRISE_LICENSE_KEY); config.setProperty("hazelcast.wait.seconds.before.join", "0"); SocketInterceptorConfig interceptorConfig = new SocketInterceptorConfig(); interceptorConfig.setEnabled(true).setClassName(MySocketInterceptor.class.getName()); config.getNetworkConfig().setSocketInterceptorConfig(interceptorConfig); return config; }
private static Config createConfig() { Config config = new Config(); config.setLicenseKey(ENTERPRISE_LICENSE_KEY); config.setProperty("hazelcast.wait.seconds.before.join", "0"); SocketInterceptorConfig interceptorConfig = new SocketInterceptorConfig(); interceptorConfig.setEnabled(true).setClassName(MySocketInterceptor.class.getName()); config.getNetworkConfig().setSocketInterceptorConfig(interceptorConfig); return config; }