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 void socketInterceptor(XmlGenerator gen, SocketInterceptorConfig socketInterceptor) { if (socketInterceptor == null) { return; } gen.open("socket-interceptor", "enabled", socketInterceptor.isEnabled()) .node("class-name", classNameOrImplClass(socketInterceptor.getClassName(), socketInterceptor.getImplementation())) .appendProperties(socketInterceptor.getProperties()) .close(); }
private static void socketInterceptor(XmlGenerator gen, SocketInterceptorConfig socketInterceptor) { if (socketInterceptor == null) { return; } gen.open("socket-interceptor", "enabled", socketInterceptor.isEnabled()) .node("class-name", classNameOrImplClass(socketInterceptor.getClassName(), socketInterceptor.getImplementation())) .appendProperties(socketInterceptor.getProperties()) .close(); }
private static void socketInterceptorConfigXmlGenerator(XmlGenerator gen, NetworkConfig netCfg) { SocketInterceptorConfig socket = netCfg.getSocketInterceptorConfig(); gen.open("socket-interceptor", "enabled", socket != null && socket.isEnabled()); if (socket != null) { gen.node("class-name", classNameOrImplClass(socket.getClassName(), socket.getImplementation())) .appendProperties(socket.getProperties()); } gen.close(); }
private static void socketInterceptorConfigXmlGenerator(XmlGenerator gen, NetworkConfig netCfg) { SocketInterceptorConfig socket = netCfg.getSocketInterceptorConfig(); gen.open("socket-interceptor", "enabled", socket != null && socket.isEnabled()); if (socket != null) { gen.node("class-name", classNameOrImplClass(socket.getClassName(), socket.getImplementation())) .appendProperties(socket.getProperties()); } gen.close(); }