java.lang.Object
tech.deplant.java4ever.binding.ffi.EverSdkContext
- All Implemented Interfaces:
tc_response_handler_t.Function
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addResponse
(int requestId, String responseString) void
apply
(int request_id, MemorySegment params_json, int response_type, boolean finished) <R,
P, AP, AR>
CompletableFuture<R> callAsync
(String functionName, P functionInputs, Class<R> resultClass, Consumer<com.fasterxml.jackson.databind.JsonNode> eventConsumer, AppObject<AP, AR> appObject) Most used call to EVER-SDK with some output objectconfig()
int
id()
int
int
-
Constructor Details
-
EverSdkContext
-
-
Method Details
-
callAsync
public <R,P, CompletableFuture<R> callAsyncAP, AR> (String functionName, P functionInputs, Class<R> resultClass, Consumer<com.fasterxml.jackson.databind.JsonNode> eventConsumer, AppObject<AP, AR> appObject) throws EverSdkExceptionMost used call to EVER-SDK with some output object- Type Parameters:
R
- Class of the result objectP
- Class of the function params objectAP
- Class of the AppObject param callsAR
- Class of the AppObject result callbacks- Parameters:
functionName
-functionInputs
- record of input type, usually ParamsOf...resultClass
- class of output type record, usually ResultOf...class- Returns:
- output type record, usually ResultOf...
- Throws:
EverSdkException
-
requestCountNextVal
public int requestCountNextVal() -
addResponse
-
id
public int id() -
requestCount
public int requestCount() -
config
-
apply
- Specified by:
apply
in interfacetc_response_handler_t.Function
- Parameters:
request_id
-params_json
- memory segment with native response stringresponse_type
- Type of response with following possible values: RESULT = 1, real response. NOP = 2, no operation. In combination with finished = true signals that the request handling was finished. APP_REQUEST = 3, request some data from application. See Application objects APP_NOTIFY = 4, notify application with some data. See Application objects RESERVED = 5..99 – reserved for protocol internal purposes. Application (or binding) must ignore this response. CUSTOM >= 100 - additional function data related to request handling. Depends on the function.finished
-
-