X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-netty-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fnettyutil%2Fhandler%2FNetconfEXICodec.java;h=415afe3d0abad056a01a6b6301ec05f972177025;hb=refs%2Fheads%2Fmaster;hp=b8924bbcdc8b4a7bbfe680d67e3ff3250c01fc0c;hpb=1e174be6002940e17aee31d15f8914273d30f25c;p=netconf.git diff --git a/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/NetconfEXICodec.java b/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/NetconfEXICodec.java index b8924bbcdc..415afe3d0a 100644 --- a/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/NetconfEXICodec.java +++ b/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/NetconfEXICodec.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.netconf.nettyutil.handler; import static java.util.Objects.requireNonNull; @@ -13,14 +12,12 @@ import static java.util.Objects.requireNonNull; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; -import com.siemens.ct.exi.core.EXIFactory; -import com.siemens.ct.exi.core.exceptions.EXIException; -import com.siemens.ct.exi.main.api.sax.SAXEncoder; -import com.siemens.ct.exi.main.api.sax.SAXFactory; import org.opendaylight.netconf.nettyutil.handler.exi.EXIParameters; +import org.opendaylight.netconf.shaded.exificient.core.EXIFactory; +import org.opendaylight.netconf.shaded.exificient.core.exceptions.EXIException; +import org.opendaylight.netconf.shaded.exificient.main.api.sax.SAXEncoder; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; -import org.xml.sax.XMLReader; public final class NetconfEXICodec { /** @@ -41,24 +38,23 @@ public final class NetconfEXICodec { } }); - private final SAXFactory exiFactory; + private final ThreadLocalSAXFactory exiFactory; private NetconfEXICodec(final EXIFactory exiFactory) { - this.exiFactory = new SAXFactory(requireNonNull(exiFactory)); + this.exiFactory = new ThreadLocalSAXFactory(requireNonNull(exiFactory)); } public static NetconfEXICodec forParameters(final EXIParameters parameters) { return CODECS.getUnchecked(parameters); } - XMLReader getReader() throws EXIException { - final XMLReader reader = exiFactory.createEXIReader(); + ThreadLocalSAXDecoder getReader() throws EXIException { + final ThreadLocalSAXDecoder reader = exiFactory.createEXIReader(); reader.setEntityResolver(ENTITY_RESOLVER); return reader; } SAXEncoder getWriter() throws EXIException { - final SAXEncoder writer = exiFactory.createEXIWriter(); - return writer; + return exiFactory.createEXIWriter(); } }