Class AbstractComponent

    • Field Detail

      • COMPONENT

        protected static final java.lang.String COMPONENT
        Deprecated.
        See Also:
        Constant Field Values
      • log

        protected final java.util.logging.Logger log
        Deprecated.
    • Constructor Detail

      • AbstractComponent

        public AbstractComponent()
        Deprecated.
    • Method Detail

      • 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 java.lang.String getComponentVersion()
        Deprecated.
        Returns version of component. Used for Service Discovery purposes.
        Returns:
        version of component.
      • getDefaults

        public java.util.Map<java.lang.String,​java.lang.Object> getDefaults​(java.util.Map<java.lang.String,​java.lang.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​(javax.script.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.
      • setEventBus

        public void setEventBus​(EventBus eventBus)
        Deprecated.
      • addOutPacket

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

        protected abstract java.util.Map<java.lang.String,​java.lang.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

        protected void initModules​(java.util.Map<java.lang.String,​java.lang.Object> props)
                            throws java.lang.InstantiationException,
                                   java.lang.IllegalAccessException,
                                   java.lang.IllegalArgumentException,
                                   java.lang.reflect.InvocationTargetException
        Deprecated.
        Throws:
        java.lang.InstantiationException
        java.lang.IllegalAccessException
        java.lang.IllegalArgumentException
        java.lang.reflect.InvocationTargetException