Package app.l2nx.gs.adapter.core.connect
Class HttpURLConnectionConnectClient
java.lang.Object
app.l2nx.gs.adapter.core.connect.HttpURLConnectionConnectClient
- All Implemented Interfaces:
ConnectClient
JDK-only
ConnectClient backed by HttpURLConnection + Gson.
Sets Authorization: Bearer <serverKey>, Content-Type:
application/json; charset=UTF-8, Connection: close (avoids leaking
connections into a host-JVM connection pool we don't own). Connect timeout
5s, read timeout 10s — adapter is fire-and-forget; long stalls would just
delay the inevitable retry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSend the connect request and return a typed result.
-
Constructor Details
-
HttpURLConnectionConnectClient
public HttpURLConnectionConnectClient()
-
-
Method Details
-
connect
public ConnectResult connect(String url, String serverKey, app.l2nx.gs.adapter.api.rest.ConnectRequest body) Description copied from interface:ConnectClientSend the connect request and return a typed result.- Specified by:
connectin interfaceConnectClient- Parameters:
url- full URL — typically<platformUrl>/api/tenants/servers/connectserverKey- raw server-key value (sent asAuthorization: Bearer <key>)body- request payload- Returns:
- outcome of the call — never
null, never throws
-