@Test public void testProcessRequest() throws Exception { String netconfRequest = "<rpc xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\" message-id=\"4\">\n" + " <get>\n" + " <filter>\n" + " <manageEvent:netconf xmlns:manageEvent=\"urn:ietf:params:xml:ns:netmod:notification\" />\n" + " </filter>\n" + " </get>\n" + "</rpc>"; NetconfClientInfo clientInfo = new NetconfClientInfo("test", 1); m_notificationAdapter.processRequest(clientInfo, netconfRequest); verify(m_netconfServer).onGet(anyObject(), anyObject(), anyObject()); }
@Override public String processRequest(NetconfClientInfo clientInfo, String netconfRequest) throws DispatchException { Document document = AggregatorMessage.stringToDocument(netconfRequest); String messageId = NetconfMessageUtil.getMessageIdFromRpcDocument(document); NetConfResponse response = notifManagement(clientInfo, document); response.setMessageId(messageId); return response.responseToString(); }
NotificationAdapter implements GlobalRequestProcessor { @Override public String processRequest(NetconfClientInfo clientInfo, String netconfRequest) throws DispatchException { Document document = AggregatorMessage.stringToDocument(netconfRequest); String messageId = NetconfMessageUtil.getMessageIdFromRpcDocument(document); NetConfResponse response = notifManagement(clientInfo, document); response.setMessageId(messageId); return response.responseToString(); } }
NotificationAdapter implements GlobalRequestProcessor { @Override public String processRequest(NetconfClientInfo clientInfo, String netconfRequest) throws DispatchException { Document document = AggregatorMessage.stringToDocument(netconfRequest); String messageId = NetconfMessageUtil.getMessageIdFromRpcDocument(document); NetConfResponse response = notifManagement(clientInfo, document); response.setMessageId(messageId); return response.responseToString(); } private  NotificationAdapter();  NotificationAdapter(Aggregator aggregator, NetconfServer netconfServer); }
NotificationAdapter implements GlobalRequestProcessor { @Override public String processRequest(NetconfClientInfo clientInfo, String netconfRequest) throws DispatchException { Document document = AggregatorMessage.stringToDocument(netconfRequest); String messageId = NetconfMessageUtil.getMessageIdFromRpcDocument(document); NetConfResponse response = notifManagement(clientInfo, document); response.setMessageId(messageId); return response.responseToString(); } private  NotificationAdapter();  NotificationAdapter(Aggregator aggregator, NetconfServer netconfServer); void init(); void destroy(); @Override String processRequest(NetconfClientInfo clientInfo, String netconfRequest); }
NotificationAdapter implements GlobalRequestProcessor { @Override public String processRequest(NetconfClientInfo clientInfo, String netconfRequest) throws DispatchException { Document document = AggregatorMessage.stringToDocument(netconfRequest); String messageId = NetconfMessageUtil.getMessageIdFromRpcDocument(document); NetConfResponse response = notifManagement(clientInfo, document); response.setMessageId(messageId); return response.responseToString(); } private  NotificationAdapter();  NotificationAdapter(Aggregator aggregator, NetconfServer netconfServer); void init(); void destroy(); @Override String processRequest(NetconfClientInfo clientInfo, String netconfRequest);  }