Class ExternalGetOltApiClient
java.lang.Object
org.bgerp.plugin.bgb.getolt.dao.ExternalGetOltApiClient
Thin HTTP proxy to the External API of the standalone GetOLT v2 service.
Returns raw JSON body — no DTOs, parsing and rendering happen on the client.
Used by the "Mass incident" tab (spec #11). X-API-Key header,
one retry on 5xx/IOException.
-
Constructor Summary
ConstructorsConstructorDescriptionExternalGetOltApiClient(String baseUrl, String apiKey, int timeoutMs, boolean trustSelfSigned) -
Method Summary
Modifier and TypeMethodDescriptionGET {base}/olts?city=...&operator=...&size=100— raw JSONlistOltsByCity(String city) GET {base}/olts?city=...&size=100— raw JSONlistOnusByOlt(String ip) GET {base}/onus?oltIp={ip}&size=2000— all ONUs of the OLT, raw JSONlistOnusByPort(String ip, int portNumber) GET {base}/onus/olt/{ip}/port/{portNumber}— raw JSONGET {base}/olts/{ip}/ports— raw JSONGET {base}/olts/statistics— all OLTs with a per-port breakdown of ONU by status/signal.refreshOlt(String ip) POST {base}/actions/refresh/olt/{ip}— requires FULL key
-
Constructor Details
-
ExternalGetOltApiClient
public ExternalGetOltApiClient(String baseUrl, String apiKey, int timeoutMs, boolean trustSelfSigned) - Parameters:
baseUrl- base URL of the External API, including the path prefixapiKey- value of the X-API-Key headertimeoutMs- connection and read timeouttrustSelfSigned- trusts the service certificate without checking the chain
-
-
Method Details
-
listOltsByCity
GET {base}/olts?city=...&size=100— raw JSON- Throws:
IOException
-
oltStatistics
GET {base}/olts/statistics— all OLTs with a per-port breakdown of ONU by status/signal. One request instead of/olts+ N×/olts/{ip}/ports.- Throws:
IOException
-
listOlts
GET {base}/olts?city=...&operator=...&size=100— raw JSON- Throws:
IOException
-
listPorts
GET {base}/olts/{ip}/ports— raw JSON- Throws:
IOException
-
listOnusByOlt
GET {base}/onus?oltIp={ip}&size=2000— all ONUs of the OLT, raw JSON- Throws:
IOException
-
listOnusByPort
GET {base}/onus/olt/{ip}/port/{portNumber}— raw JSON- Throws:
IOException
-
refreshOlt
POST {base}/actions/refresh/olt/{ip}— requires FULL key- Throws:
IOException
-