-
- protected HandlingPriority canHandle(final String operationName,
- final String operationNamespace) {
- return operationName.equals(getOperationName())
- && operationNamespace.equals(getOperationNamespace())
- ? HandlingPriority.HANDLE_WITH_DEFAULT_PRIORITY.increasePriority(1100)
- : HandlingPriority.CANNOT_HANDLE;
- }
-
- public static final class OperationNameAndNamespace {
- private final String operationName;
- private final String namespace;
-
- private final XmlElement operationElement;
-
- public OperationNameAndNamespace(final Document message) throws DocumentedException {
- XmlElement requestElement = null;
- requestElement = getRequestElementWithCheck(message);
- operationElement = requestElement.getOnlyChildElement();
- operationName = operationElement.getName();
- namespace = operationElement.getNamespace();
- }
-
- public String getOperationName() {
- return operationName;
- }
-
- public String getNamespace() {
- return namespace;
- }
-
- public XmlElement getOperationElement() {
- return operationElement;
- }
-
- }
-
- protected static XmlElement getRequestElementWithCheck(final Document message)
- throws DocumentedException {
- return XmlElement.fromDomElementWithExpected(message.getDocumentElement(),
- XmlNetconfConstants.RPC_KEY, XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);
- }
-
- protected String getOperationNamespace() {
- return OP_NAMESPACE;
- }
-
- protected String getOperationName() {
- return OP_NAME;
- }
-