Package tigase.stats

Class StatisticsCollector

    • Field Detail

      • ERRORS_STATISTICS_MBEAN_NAME

        public static final java.lang.String ERRORS_STATISTICS_MBEAN_NAME
        See Also:
        Constant Field Values
      • STATISTICS_MBEAN_NAME

        public static final java.lang.String STATISTICS_MBEAN_NAME
        See Also:
        Constant Field Values
      • STATS_HISTORY_SIZE_PROP_KEY

        public static final java.lang.String STATS_HISTORY_SIZE_PROP_KEY
        See Also:
        Constant Field Values
      • STATS_HISTORY_SIZE_PROP_VAL

        public static final int STATS_HISTORY_SIZE_PROP_VAL
        See Also:
        Constant Field Values
      • STATS_UPDATE_INTERVAL_PROP_KEY

        public static final java.lang.String STATS_UPDATE_INTERVAL_PROP_KEY
        See Also:
        Constant Field Values
      • STATS_HIGH_MEMORY_LEVEL_KEY

        public static final java.lang.String STATS_HIGH_MEMORY_LEVEL_KEY
        See Also:
        Constant Field Values
    • Constructor Detail

      • StatisticsCollector

        public StatisticsCollector()
    • Method Detail

      • initializationCompleted

        public void initializationCompleted()
        Description copied from interface: ServerComponent
        Method is called by MessageRouter when all the startup components of the server have been loaded and configured through setProperties(...) call. At this point the whole server should be loaded and functional, except initializations taking place in this routine.
        Specified by:
        initializationCompleted in interface ServerComponent
        Overrides:
        initializationCompleted in class BasicComponent
      • processPacket

        public void processPacket​(Packet packet,
                                  java.util.Queue<Packet> results)
        Description copied from interface: ServerComponent
        processPacket is a blocking processing method implemented by all components. This method processes packet and returns results instantly without waiting for any resources.
        Specified by:
        processPacket in interface ServerComponent
        Overrides:
        processPacket in class BasicComponent
        Parameters:
        packet - a Packet value
      • getComponentsNames

        public java.util.List<java.lang.String> getComponentsNames()
      • getComponentStats

        public void getComponentStats​(java.lang.String name,
                                      StatisticsList list)
      • getDiscoFeatures

        public java.util.List<Element> getDiscoFeatures​(JID from)
        Description copied from class: BasicComponent
        Method returns list of features provided by this component for provided JID.
        Specified by:
        getDiscoFeatures in interface XMPPService
        Overrides:
        getDiscoFeatures in class BasicComponent
        Parameters:
        from - a request sender address. Some service disco elements are meant to be available only to system administrarors. The component is responsible to check whether the sender is the component administrator and return results appropriate.
        Returns:
        list of features
      • getDiscoInfo

        public Element getDiscoInfo​(java.lang.String node,
                                    JID jid,
                                    JID from)
        Description copied from interface: XMPPService
        Returns service discovery info for the component. If the jid is null then this is info for the top level request. SM may return disco info on the top level. Other components should not.
        Specified by:
        getDiscoInfo in interface XMPPService
        Overrides:
        getDiscoInfo in class BasicComponent
        Parameters:
        node - is service discovery node for which the request is made. Is normally null for the component top level request.
        jid - is the jid to which the request has been made.
        from - is the request sender address. Some service discovery information is only meant for administrators.
        Returns:
        returns an XML Element with service discovery data.
      • getDiscoItems

        public java.util.List<Element> getDiscoItems​(java.lang.String node,
                                                     JID jid,
                                                     JID from)
        Description copied from interface: XMPPService
        Returns service discovery items for the component. If the JID is null then this is request for the top level request. SM may return disco items on the top level, other components should just return it's top level service discovery item for null node.
        Specified by:
        getDiscoItems in interface XMPPService
        Overrides:
        getDiscoItems in class BasicComponent
        Parameters:
        node - is a service discovery node for which the request has been made.
        jid - is the jid to which the request has been made.
        from - is the request sender address. Some service discovery information is only meant for administrators.
        Returns:
        a list of service discovery items for this component or the component itself disco item for the top level request.
      • setName

        public void setName​(java.lang.String name)
        Description copied from interface: ServerComponent
        Method used to assign component name (localpart of the component)
        Specified by:
        setName in interface ServerComponent
        Overrides:
        setName in class BasicComponent
        Parameters:
        name - to be assigned
      • isCorrectType

        public boolean isCorrectType​(ServerComponent component)
        Description copied from class: AbstractComponentRegistrator
        Method checks whether the component provides as method parameter is correct type that is implements special interface or extends special class. Result of the method determines whether the component can be added to the internal components collection.
        Specified by:
        isCorrectType in class AbstractComponentRegistrator<StatisticsContainer>
        Parameters:
        component - is a reference to the component being checked.
        Returns:
        a boolean value of true if the component is of a correct type and false otherwise.
      • 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
      • statsUpdated

        protected void statsUpdated()