https://github.com/microfocus/octane-websockets-client-java
WebSockets client providing connectivity to ALM Octane's endpoints (Java env)
https://github.com/microfocus/octane-websockets-client-java
octane
Last synced: 9 months ago
JSON representation
WebSockets client providing connectivity to ALM Octane's endpoints (Java env)
- Host: GitHub
- URL: https://github.com/microfocus/octane-websockets-client-java
- Owner: MicroFocus
- Created: 2019-03-13T09:53:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-18T22:21:08.000Z (almost 3 years ago)
- Last Synced: 2024-12-28T16:49:02.151Z (over 1 year ago)
- Topics: octane
- Language: Java
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### Summary
`octane-websockets-client` library is dedicated to simplify consumption of Octane's WebSocket APIs by consumers.
The library provides simple configuration means which used afterwards to establish WS connectivity.
Given credentials are provided, the `octane-websockets-client` will perform the authentication management against Octane under the hood.
Proxy configuration is supported as well.
### Basic walk through
Regular usage of library will involve the below steps:
- create `OctaneWSClientContext` starting with `OctaneWSClientContext.builder()` API
- implement your WS endpoint handler extending `OctaneWSEndpointClient`
- create instance of your WS endpoint with the previously created context object
- initialize the client with `OctaneWSClientService.getInstance().initClient(client)`
Assuming, that your WS endpoint implementation class is `MyOctaneWSEndpointHandler`, the whole process will look like this:
```java
// Octane WS/WSS endpoints will always start from 'messaging'
// proxy settings are optionals
OctaneWSClientContext context = OctaneWSClientContext.builder()
.setEndpointUrl("ws://some.octane.host:1111/messaging/some/ws/endpoint?param=value")
.setClient("your_ws_username")
.setSecret("your_ws_password")
.setProxyUrl("http://web-proxy.host:2222")
.setProxyUsername("proxy_username_if_relevant")
.setProxyPassword("proxy_password_if_relevant")
.build();
OctaneWSEndpointClient client = new MyOctaneWSEndpointHandler(context);
OctaneWSClientService.getInstance().initClient(client);
// the client is ready to send and receive WS messages
```