Commons networking related utils.
Note: This is not an official Cisco product.
SSE client implementation based on Java 11 HttpClient.
Server-Sent Events (SSE) is a server push technology
enabling a client to receive automatic updates from a server via HTTP connection.
The Server-Sent Events EventSource API is standardized as part of
HTML.
It is used for unidirectional server to client events, as opposed to the full-duplex bidirectional WebSockets.
One of the use cases is by IEFT Netconf/Restconf protocols:
IETF reference
EventHandler eventHandler = eventText -> { events.add(eventText); };
SSEClient sseClient = SSEClient.builder().url(url).eventHandler(eventHandler)
.build();
sseClient.start();
Parsing string representation of GNMI paths.
Following:
Representing GNMI paths as strings
This is useful for device collection / GNMI path configuration.
String gnmiPathStr = "openconfig-interfaces/interfaces/interface[name=Ethernet/1/2/3]/state";
Path parsedPath = GNMIUtils.parseGNMIPathStr(gnmiPathStr);
Code analysis done with Sonar, and code review.
Flows are covered by unit tests and manual testing.
Run maven install on commons-networking parent.
- Contributing - how to contribute.
- Contributors - Folks who have contributed, thanks very much!
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Liran Mendelovich
Cisco