Class AbstractKernelBasedComponent

All Implemented Interfaces:
ClusteredComponentIfc, Configurable, XMPPService, ConfigurationChangedAware, Initializable, RegistrarBean, DisableDisco, MessageReceiver, PacketWriterWithTimeout, ServerComponent, StatisticsContainer, StatisticsContainerIfc, VHostListener
Direct Known Subclasses:
ComponentProtocolManager, EventBusComponent, ExternalServiceDiscoveryComponent, MonitorComponent, TestComponent

public abstract class AbstractKernelBasedComponent extends AbstractMessageReceiver implements XMPPService, DisableDisco, RegistrarBean
  • Field Details

    • eventBus

      protected final EventBus eventBus
    • log

      protected final Logger log
    • kernel

      protected Kernel kernel
  • Constructor Details

    • AbstractKernelBasedComponent

      public AbstractKernelBasedComponent()
  • Method Details

    • getComponentVersion

      public String getComponentVersion()
    • getKernel

      public Kernel getKernel()
    • initBindings

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

      public void start()
      Specified by:
      start in interface MessageReceiver
      start in class AbstractMessageReceiver
    • isDiscoNonAdmin

      public abstract boolean isDiscoNonAdmin()
      Is this component discoverable by disco#items for domain by non admin users.
      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
      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
      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
      kernel - - instance from local scope
    • updateServiceEntity

      public void updateServiceEntity()
      updateServiceEntity in class BasicComponent
    • createScriptEngineManager

      protected ScriptEngineManager createScriptEngineManager()
      createScriptEngineManager in class BasicComponent
    • registerModules

      protected abstract void registerModules(Kernel kernel)