X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2Fmapping%2Foperations%2FDefaultStartExi.java;h=31a7d320ea98d94b2012fe310df344df57af03a9;hb=b66923141fce710094cb8e61bf794f9f0e678f50;hp=c18d0cc35f958bc543106810c91d3e11ced1d920;hpb=237237663265bfda9069c66151371ce7697aed59;p=controller.git diff --git a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStartExi.java b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStartExi.java index c18d0cc35f..31a7d320ea 100644 --- a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStartExi.java +++ b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStartExi.java @@ -7,15 +7,10 @@ */ package org.opendaylight.controller.netconf.impl.mapping.operations; -import org.opendaylight.controller.netconf.api.NetconfSession; import org.opendaylight.controller.netconf.api.NetconfDocumentedException; -import org.opendaylight.controller.netconf.api.NetconfOperationRouter; -import org.opendaylight.controller.netconf.impl.mapping.ExiDecoderHandler; -import org.opendaylight.controller.netconf.impl.mapping.ExiEncoderHandler; +import org.opendaylight.controller.netconf.api.NetconfSession; import org.opendaylight.controller.netconf.mapping.api.DefaultNetconfOperation; -import org.opendaylight.controller.netconf.mapping.api.HandlingPriority; -import org.opendaylight.controller.netconf.util.mapping.AbstractNetconfOperation; -import org.opendaylight.controller.netconf.util.xml.ExiParameters; +import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation; import org.opendaylight.controller.netconf.util.xml.XmlElement; import org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants; import org.opendaylight.controller.netconf.util.xml.XmlUtil; @@ -24,13 +19,11 @@ import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; -import com.siemens.ct.exi.exceptions.EXIException; - -public class DefaultStartExi extends AbstractNetconfOperation implements DefaultNetconfOperation { +public class DefaultStartExi extends AbstractSingletonNetconfOperation implements DefaultNetconfOperation { public static final String START_EXI = "start-exi"; - private static NetconfSession netconfSession; + private NetconfSession netconfSession; private static final Logger logger = LoggerFactory.getLogger(DefaultStartExi.class); @@ -39,20 +32,12 @@ public class DefaultStartExi extends AbstractNetconfOperation implements Default } @Override - protected HandlingPriority canHandle(String operationName, - String netconfOperationNamespace) { - if (operationName.equals(START_EXI) == false) - return HandlingPriority.CANNOT_HANDLE; - if (netconfOperationNamespace - .equals(XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0) == false) - return HandlingPriority.CANNOT_HANDLE; - - return HandlingPriority.HANDLE_WITH_DEFAULT_PRIORITY; + protected String getOperationName() { + return START_EXI; } @Override - protected Element handle(Document document, XmlElement operationElement, - NetconfOperationRouter opRouter) throws NetconfDocumentedException { + protected Element handleWithNoSubsequentOperations(Document document, XmlElement operationElement) throws NetconfDocumentedException { Element getSchemaResult = document @@ -61,6 +46,9 @@ public class DefaultStartExi extends AbstractNetconfOperation implements Default XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0); + throw new UnsupportedOperationException("Not implemented"); + + /* try { ExiParameters exiParams = new ExiParameters(); exiParams.setParametersFromXmlElement(operationElement); @@ -73,10 +61,10 @@ public class DefaultStartExi extends AbstractNetconfOperation implements Default .createElement(XmlNetconfConstants.RPC_ERROR); } - logger.info("{} operation successful", START_EXI); + logger.trace("{} operation successful", START_EXI); logger.debug("received start-exi message {} ", XmlUtil.toString(document)); return getSchemaResult; - + */ } @Override