Package ej.wasi

Interface WasiSSLRegistry

  • All Superinterfaces:
    WasiIORegistry

    public interface WasiSSLRegistry
    extends WasiIORegistry
    Provides per-module SSL context and SSL connection registration and resolution.

    Extends WasiIORegistry so a single cast on WasmModule.getHostInfo() grants access to both file-descriptor and SSL state.

    Implemented by WasiContext (package-private).

    • Method Detail

      • registerSSLContext

        int registerSSLContext​(SSLContext ctx)
        Registers the given SSL context and returns its identifier.
        Parameters:
        ctx - the SSL context to register.
        Returns:
        the identifier of the registered SSL context.
      • getSSLContext

        @Nullable
        SSLContext getSSLContext​(int id)
        Returns the SSL context registered under the given identifier, or null if not found.
        Parameters:
        id - the SSL context identifier.
        Returns:
        the SSLContext, or null.
      • unregisterSSLContext

        void unregisterSSLContext​(int id)
        Unregisters the SSL context identified by the given identifier.
        Parameters:
        id - the SSL context identifier to unregister.
      • registerSSL

        int registerSSL​(WasiSSL ssl)
        Registers the given WasiSSL and returns its identifier.
        Parameters:
        ssl - the WasiSSL to register.
        Returns:
        the identifier of the registered WasiSSL.
      • getSSL

        @Nullable
        WasiSSL getSSL​(int id)
        Returns the WasiSSL registered under the given identifier, or null if not found.
        Parameters:
        id - the SSL identifier.
        Returns:
        the WasiSSL, or null.
      • unregisterSSL

        void unregisterSSL​(int id)
        Unregisters the WasiSSL identified by the given identifier.
        Parameters:
        id - the SSL identifier to unregister.