Class EventBusComponent

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

  • Constructor Details

    • EventBusComponent

      public EventBusComponent()
  • Method Details

    • getDiscoCategory

      public String getDiscoCategory()
      Description copied from class: BasicComponent
      Method returns category of a component used for service discovery responses.
      Overrides:
      getDiscoCategory in class BasicComponent
      Returns:
      category of a component
    • getDiscoCategoryType

      public String getDiscoCategoryType()
      Description copied from class: BasicComponent
      Method returns component category type used for service discovery responses.
      Overrides:
      getDiscoCategoryType in class BasicComponent
      Returns:
      category type of a component
    • getDiscoDescription

      public String getDiscoDescription()
      Description copied from class: BasicComponent
      Method returns description used for service discovery responses.
      Overrides:
      getDiscoDescription in class BasicComponent
      Returns:
      description of a component
    • getStatistics

      public void getStatistics(StatisticsList list)
      Description copied from class: AbstractMessageReceiver
      Method returns component statistics. Please note, the method can be called every second by the server monitoring system therefore no extensive or lengthy calculations are allowed. If there are some statistics requiring lengthy operations like database access they must have Level.FINEST assigned and must be put inside the level guard to prevent generating them by the system monitor. The system monitor does not collect FINEST statistics.
      Level guard code looks like the example below:
       if (list.checkLevel(Level.FINEST)) {
         // Some CPU intensive calculations or lengthy operations
         list.add(getName(), "Statistic description", stat_value, Level.FINEST);
       }
      
       
      This way you make sure your extensive operation is not executed every second by the monitoring system and does not affect the server performance.
      Specified by:
      getStatistics in interface StatisticsContainerIfc
      Overrides:
      getStatistics in class AbstractMessageReceiver
      Parameters:
      list - is a StatistcsList where all statistics are stored.
    • isDiscoNonAdmin

      public boolean isDiscoNonAdmin()
      Description copied from class: AbstractKernelBasedComponent
      Is this component discoverable by disco#items for domain by non admin users.
      Specified by:
      isDiscoNonAdmin in class AbstractKernelBasedComponent
      Returns:
      true - if yes
    • isSubdomain

      public boolean isSubdomain()
      Overrides:
      isSubdomain in class BasicComponent
    • onNodeDisconnected

      public void onNodeDisconnected(JID jid)
      Overrides:
      onNodeDisconnected in class BasicComponent
    • 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.
      Overrides:
      processPacket in class AbstractKernelBasedComponent
      Parameters:
      packet - is an instance of the Packet class passed for processing.
    • processingInThreads

      public int processingInThreads()
      Description copied from class: AbstractMessageReceiver
      Concurrency control method. Returns preferable number of threads set for this component.
      Overrides:
      processingInThreads in class AbstractMessageReceiver
      Returns:
      preferable number of threads set for this component.
    • processingOutThreads

      public int processingOutThreads()
      Description copied from class: AbstractMessageReceiver
      Concurrency control method. Returns preferable number of threads set for this component.
      Overrides:
      processingOutThreads in class AbstractMessageReceiver
      Returns:
      preferable number of threads set for this component.
    • setClusterController

      public void setClusterController(ClusterControllerIfc cl_controller)
      Description copied from interface: ClusteredComponentIfc
      Set's the configures the cluster controller object for cluster communication and API.
      Specified by:
      setClusterController in interface ClusteredComponentIfc
      Overrides:
      setClusterController in class BasicComponent
      Parameters:
      cl_controller - cluster controller object used for cluster communication
    • onNodeConnected

      protected void onNodeConnected(JID jid)
      Overrides:
      onNodeConnected in class BasicComponent
    • registerModules

      protected void registerModules(Kernel kernel)
      Specified by:
      registerModules in class AbstractKernelBasedComponent