Class AbstractKernelBasedComponent

    • Field Detail

      • eventBus

        protected final EventBus eventBus
      • log

        protected final java.util.logging.Logger log
      • kernel

        protected Kernel kernel
    • Constructor Detail

      • AbstractKernelBasedComponent

        public AbstractKernelBasedComponent()
    • Method Detail

      • getComponentVersion

        public java.lang.String getComponentVersion()
      • getKernel

        public Kernel getKernel()
      • initBindings

        public void initBindings​(javax.script.Bindings binds)
        Description copied from class: BasicComponent
        Initialize a mapping of key/value pairs which can be used in scripts loaded by the server
        Overrides:
        initBindings in class BasicComponent
        Parameters:
        binds - A mapping of key/value pairs, all of whose keys are Strings.
      • isDiscoNonAdmin

        public abstract boolean isDiscoNonAdmin()
        Is this component discoverable by disco#items for domain by non admin users.
        Returns:
        true - if yes
      • processPacket

        public void processPacket​(Packet packet)
        Description copied from class: AbstractMessageReceiver
        This is the main Packet processing method. It is called concurrently from many threads so implementing it in thread save manner is essential. The method is called for each packet addressed to the component.
        Please note, the Packet instance may be processed by different parts of the server, different components or plugins at the same time. Therefore this is very important to tread the Packet instance as unmodifiable object.
        Processing in this method is asynchronous, therefore there is no result value. If there are some 'result' packets generated during processing, they should be passed back using addOutPacket(Packet) method.
        Specified by:
        processPacket in class AbstractMessageReceiver
        Parameters:
        packet - is an instance of the Packet class passed for processing.
      • register

        public void register​(Kernel kernel)
        Description copied from interface: RegistrarBean
        Method called when bean is being registered allowing developer to programatically register other beans.
        Specified by:
        register in interface RegistrarBean
        Parameters:
        kernel - - instance from local scope
      • unregister

        public void unregister​(Kernel kernel)
        Description copied from interface: RegistrarBean
        Method called while bean is being unregistered.
        Specified by:
        unregister in interface RegistrarBean
        Parameters:
        kernel - - instance from local scope
      • registerModules

        protected abstract void registerModules​(Kernel kernel)