Package io.polywrap.core
Interface Client
-
- All Implemented Interfaces:
public interface ClientClient invokes wrappers and interacts with wrap packages.
-
-
Method Summary
Modifier and Type Method Description abstract Result<Wrapper>)>loadWrapper(Uri uri, <Error class: unknown class> resolutionContext)Resolves the Wrapper at the specified URI. abstract Result<ByteArray>)>invokeWrapperRaw(Wrapper wrapper, Uri uri, String method, ByteArray args, ByteArray env, <Error class: unknown class> resolutionContext)Invoke a wrapper using an instance of the wrapper. abstract Result<<Error class: unknown class>>)>tryResolveUri(Uri uri, <Error class: unknown class> resolutionContext)Try to resolve a URI to a URI, package or wrapper. -
-
Method Detail
-
loadWrapper
abstract Result<Wrapper> )>loadWrapper(Uri uri, <Error class: unknown class> resolutionContext)
Resolves the Wrapper at the specified URI.
- Parameters:
uri- The URI of the wrapper to resolve.resolutionContext- The FfiUriResolutionContext to be used during URI resolution, or null for a default context.
-
invokeWrapperRaw
abstract Result<ByteArray> )>invokeWrapperRaw(Wrapper wrapper, Uri uri, String method, ByteArray args, ByteArray env, <Error class: unknown class> resolutionContext)
Invoke a wrapper using an instance of the wrapper.
- Parameters:
wrapper- An instance of a Wrapper to invoke.uri- The URI of the wrapper to be invoked.method- The method to be called on the wrapper.args- Arguments for the method, encoded in the MessagePack byte formatenv- Env variables for the wrapper invocation, encoded in the MessagePack byte formatresolutionContext- The FfiUriResolutionContext to be used during URI resolution, or null for a default context.
-
tryResolveUri
abstract Result<<Error class: unknown class>> )>tryResolveUri(Uri uri, <Error class: unknown class> resolutionContext)
Try to resolve a URI to a URI, package or wrapper.
- Parameters:
uri- The URI to resolve.resolutionContext- The FfiUriResolutionContext to be used during URI resolution, or null for a default context.
-
-
-
-