+ try {
+ QName qName = (QName) managementSession.getTransport().getField("QNAME").get(null);
+ // Add extension prefix if transport type is from extension yang module
+ if (qName.getNamespace().toString().equals(MonitoringConstants.EXTENSION_NAMESPACE)) {
+ return Joiner.on(':').join(MonitoringConstants.EXTENSION_NAMESPACE_PREFIX, qName.getLocalName());
+ } else {
+ return qName.getLocalName();
+ }
+ } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {
+ throw new IllegalArgumentException("Unknown transport type " + managementSession.getTransport(), e);
+ }
+ }
+
+ @XmlElement(name= "session-identifier", namespace = MonitoringConstants.EXTENSION_NAMESPACE)
+ public String getSessionType() {
+ return managementSession.getAugmentation(Session1.class).getSessionIdentifier();