Class HttpURLConnectionConnectClient

java.lang.Object
app.l2nx.gs.adapter.core.connect.HttpURLConnectionConnectClient
All Implemented Interfaces:
ConnectClient

public final class HttpURLConnectionConnectClient extends Object implements 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 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: ConnectClient
      Send the connect request and return a typed result.
      Specified by:
      connect in interface ConnectClient
      Parameters:
      url - full URL — typically <platformUrl>/api/tenants/servers/connect
      serverKey - raw server-key value (sent as Authorization: Bearer <key>)
      body - request payload
      Returns:
      outcome of the call — never null, never throws