Source: hyrrokkin_engine/configuration_interface.js

/*
    Hyrrokkin - a library for building and running executable graphs

    MIT License - Copyright (C) 2022-2025  Visual Topology Ltd

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software
    and associated documentation files (the "Software"), to deal in the Software without
    restriction, including without limitation the rights to use, copy, modify, merge, publish,
    distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or
    substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
    BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
    DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

var hyrrokkin_engine = hyrrokkin_engine || {};

/**
 * Defines an interface that package configuration classes should implement
 *
 * @interface
 * @type {hyrrokkin_engine.ConfigurationInterface}
 */
hyrrokkin_engine.ConfigurationInterface = class {

    /**
     * The configuration constructor is passed a configuration service instance
     *
     * @param {hyrrokkin_engine.ConfigurationServiceInterface} configuration_service
     */
    constructor(configuration_service) {
    }

    /**
     * Called after construction.  Load any resources associated with this Configuration
     *
     * @return {Promise<void>}
     */
    async load() {
    }

    /**
     *  Create a node which is defined within this package
     *
     * @param node_type_id {string} the id of the node type (a valid key in the schema's node_types dictionary)
     * @param service {hyrrokkin_engine.NodeServiceInterface} a service instance which will provide services to the node
     *
     * @return {Promise<*>}
     */
    async create_node(node_type_id, service) {
    }

    /**
     * Called when a session is opened
     *
     * @param session_id {string} identify the session being opened
     */
    open_session(session_id) {
    }

    /**
     * Called when a session is closed
     *
     * @param session_id {string} identify the session being closed
     */
    close_session(session_id) {
    }

    /**
     * Decode binary data into a value valid for a particular link type
     *
     * @param encoded_bytes {ArrayBuffer} binary data to decode
     * @param link_type {string} the link type associated with the value
     *
     * @return {*}
     */
    async decode(encoded_bytes, link_type) {
    }

    /**
     * Encode a value associated with a link type to binary data
     *
     * @param value {*} the value to encode
     * @param link_type {string} the link type associated with the value
     *
     * @return {ArrayBuffer}
     */
    async encode(value, link_type) {
    }

    /**
     * Called when a client is opened
     *
     * @param {hyrrokkin_engine.ClientInterface} client an instance providing methods to send and receive messages
     */
    async open_client(client) {
    }

    /**
     * Called when a client is closed
     *
     * @param {hyrrokkin_engine.ClientInterface} client an instance providing methods to send and receive messages
     */
    async close_client(client) {
    }

}