Class PanamaCallbackRegistry
java.lang.Object
ai.tegmentum.wasmtime4j.func.AbstractCallbackRegistry
ai.tegmentum.wasmtime4j.panama.PanamaCallbackRegistry
- All Implemented Interfaces:
ai.tegmentum.wasmtime4j.func.CallbackRegistry
public final class PanamaCallbackRegistry
extends ai.tegmentum.wasmtime4j.func.AbstractCallbackRegistry
Panama FFI implementation of the callback registry for managing callbacks and asynchronous
operations.
This registry extends AbstractCallbackRegistry with Panama-specific function reference
creation and resource cleanup through NativeResourceHandle and ArenaResourceManager.
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface ai.tegmentum.wasmtime4j.func.CallbackRegistry
ai.tegmentum.wasmtime4j.func.CallbackRegistry.AsyncCallbackHandle, ai.tegmentum.wasmtime4j.func.CallbackRegistry.AsyncHostFunction, ai.tegmentum.wasmtime4j.func.CallbackRegistry.CallbackHandle, ai.tegmentum.wasmtime4j.func.CallbackRegistry.CallbackMetrics -
Field Summary
Fields inherited from class ai.tegmentum.wasmtime4j.func.AbstractCallbackRegistry
callbacks, DEFAULT_ASYNC_TIMEOUT_MILLIS, metrics, nextCallbackId -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidcloseFunctionReference(ai.tegmentum.wasmtime4j.func.FunctionReference ref) protected ai.tegmentum.wasmtime4j.func.FunctionReferencecreateFunctionReferenceForCallback(ai.tegmentum.wasmtime4j.func.HostFunction callback, ai.tegmentum.wasmtime4j.type.FunctionType functionType) protected voidprotected ScheduledExecutorServiceMethods inherited from class ai.tegmentum.wasmtime4j.func.AbstractCallbackRegistry
createFunctionReference, getCallbackCount, getMetrics, hasCallback, invokeAsyncCallback, invokeCallback, registerAsyncCallback, registerCallback, unregisterCallback
-
Method Details
-
createFunctionReferenceForCallback
protected ai.tegmentum.wasmtime4j.func.FunctionReference createFunctionReferenceForCallback(ai.tegmentum.wasmtime4j.func.HostFunction callback, ai.tegmentum.wasmtime4j.type.FunctionType functionType) throws ai.tegmentum.wasmtime4j.exception.WasmException - Specified by:
createFunctionReferenceForCallbackin classai.tegmentum.wasmtime4j.func.AbstractCallbackRegistry- Throws:
ai.tegmentum.wasmtime4j.exception.WasmException
-
closeFunctionReference
protected void closeFunctionReference(ai.tegmentum.wasmtime4j.func.FunctionReference ref) - Specified by:
closeFunctionReferencein classai.tegmentum.wasmtime4j.func.AbstractCallbackRegistry
-
getAsyncExecutor
- Specified by:
getAsyncExecutorin classai.tegmentum.wasmtime4j.func.AbstractCallbackRegistry
-
ensureNotClosed
protected void ensureNotClosed()- Specified by:
ensureNotClosedin classai.tegmentum.wasmtime4j.func.AbstractCallbackRegistry
-
close
public void close() throws ai.tegmentum.wasmtime4j.exception.WasmException- Throws:
ai.tegmentum.wasmtime4j.exception.WasmException
-