Package app.l2nx.gs.adapter.core.connect
Class ConnectResult
java.lang.Object
app.l2nx.gs.adapter.core.connect.ConnectResult
Outcome of a single
ConnectClient.connect(java.lang.String, java.lang.String, app.l2nx.gs.adapter.api.rest.ConnectRequest) invocation.
Three shapes:
success(ConnectResponse)— HTTP 200 + parsed response body.httpError(int, ErrorEnvelope)— HTTP 4xx / 5xx (envelope may carry a typed errorcode).ioFailure(IOException)— DNS, connection refused, read timeout, or malformed JSON in a 200 body.
-
Method Summary
Modifier and TypeMethodDescriptiongetError()Optional<app.l2nx.gs.adapter.api.rest.ConnectResponse>intstatic ConnectResulthttpError(int statusCode, ErrorEnvelope envelope) static ConnectResultioFailure(IOException ioException) booleanstatic ConnectResultsuccess(app.l2nx.gs.adapter.api.rest.ConnectResponse response)
-
Method Details
-
success
-
httpError
-
ioFailure
-
getStatusCode
public int getStatusCode() -
getResponse
-
getError
-
getIoException
-
isIoFailure
public boolean isIoFailure()
-