Class AbstractComponent

All Implemented Interfaces:
ClusteredComponentIfc, Configurable, XMPPService, ConfigurationChangedAware, Initializable, DisableDisco, MessageReceiver, PacketWriterWithTimeout, ServerComponent, StatisticsContainer, StatisticsContainerIfc, VHostListener

@Deprecated public abstract class AbstractComponent extends AbstractMessageReceiver implements XMPPService, DisableDisco
Deprecated.
Do not use this class at all. Use AbstractKernelBasedComponent instead. This class is here just because developer wants to know how some parts of code worked before migration to Kernel Based TCF.
Base class for implement XMPP Component.
Author:
bmalkow
  • Field Details

  • Constructor Details

    • AbstractComponent

      public AbstractComponent()
      Deprecated.
  • Method Details

    • everyMinute

      public void everyMinute()
      Deprecated.
      Description copied from class: AbstractMessageReceiver
      Utility method executed precisely every minute. A component can overwrite the method to put own code to be executed at the regular intervals of time.
      Note, no extensive calculations should happen in this method nor long lasting operations. It is essential that the method processing does not exceed 1 minute. The overriding method must call the the super method first and only then run own code.
      Overrides:
      everyMinute in class AbstractMessageReceiver
    • getComponentVersion

      public abstract String getComponentVersion()
      Deprecated.
      Returns version of component. Used for Service Discovery purposes.
      Returns:
      version of component.
    • getDefaults

      public Map<String,Object> getDefaults(Map<String,Object> params)
      Deprecated.
      Description copied from interface: Configurable
      Returns default configuration settings for the component as a Map with keys as configuration property IDs and values as the configuration property values. All the default parameters returned from this method are later passed to the setProperties(...) method. Some of them may have changed value if they have been overwritten in the server configuration. The configuration property value can be of any of the basic types: int, long, boolean, String.
      Specified by:
      getDefaults in interface Configurable
      Overrides:
      getDefaults in class BasicComponent
      Parameters:
      params - is a Map with some initial properties set for the starting up server. These parameters can be used as a hints to generate component's default configuration.
      Returns:
      a Map with the component default configuration.
    • getKernel

      public Kernel getKernel()
      Deprecated.
    • setKernel

      public void setKernel(Kernel kernel)
      Deprecated.
    • getResponseManager

      public ResponseManager getResponseManager()
      Deprecated.
    • setResponseManager

      public void setResponseManager(ResponseManager responseManager)
      Deprecated.
    • getStanzaProcessor

      public StanzaProcessor getStanzaProcessor()
      Deprecated.
    • setStanzaProcessor

      public void setStanzaProcessor(StanzaProcessor stanzaProcessor)
      Deprecated.
    • initBindings

      public void initBindings(Bindings binds)
      Deprecated.
      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()
      Deprecated.
      Is this component discoverable by disco#items for domain by non admin users.
      Returns:
      true - if yes
    • processPacket

      public void processPacket(Packet packet)
      Deprecated.
      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.
    • setProperties

      public void setProperties(Map<String,Object> props) throws ConfigurationException
      Deprecated.
      Description copied from interface: Configurable
      Sets all configuration properties for the object.
      Specified by:
      setProperties in interface Configurable
      Overrides:
      setProperties in class BasicComponent
      Parameters:
      props - Map with the configuration
      Throws:
      ConfigurationException - - if setting configuration will fail which will make it unable to work
    • updateServiceEntity

      public void updateServiceEntity()
      Deprecated.
      Overrides:
      updateServiceEntity in class BasicComponent
    • setEventBus

      public void setEventBus(EventBus eventBus)
      Deprecated.
    • addOutPacket

      protected void addOutPacket(Packet packet, AsyncCallback asyncCallback)
      Deprecated.
    • getDefaultModulesList

      protected abstract Map<String,Class<? extends Module>> getDefaultModulesList()
      Deprecated.
      Returns default map of components. Keys in map are used as component identifiers.

      This map may be modified by config.tdsl:
      <component_name>/modules/<module_name>[S]=<module_class>
      Returns:
      map of default modules.
    • initModules

      Deprecated.
      Throws:
      InstantiationException
      IllegalAccessException
      IllegalArgumentException
      InvocationTargetException