Interface ComponentEventListener

  • All Known Implementing Classes:
    PacketCopier

    public interface ComponentEventListener
    Interface to listen for component events. Use the InternalComponentManager.addListener(ComponentEventListener) method to register for events.

    The registered event will be triggered only once no matter how many times a component is physically connected to the server or to how many cluster nodes is connected. Likewise, the unregistered event will be triggered only when the last connection of the component is no longer available.

    When running inside of a cluster each cluster node will get these event notifications. For instance, if you have a cluster of two nodes and a component connects to a node then both nodes will get the event notification.

    Author:
    Gaston Dombiak
    • Method Detail

      • componentRegistered

        void componentRegistered​(org.xmpp.packet.JID componentJID)
        A component was registered with the Component Manager. At this point the component has been intialized and started. XMPP entities can exchange packets with the component. However, the component is still not listed as a disco#items of the server since the component has not answered the disco#info request sent by the server.
        Parameters:
        componentJID - address where the component can be located (e.g. search.myserver.com)
      • componentUnregistered

        void componentUnregistered​(org.xmpp.packet.JID componentJID)
        A component was removed. This means that no other cluster node has this component and this was the last connection of the component.
        Parameters:
        componentJID - address where the component was located (e.g. search.myserver.com)
      • componentInfoReceived

        void componentInfoReceived​(org.xmpp.packet.IQ iq)
        The server has received a disco#info response from the component. Once a component is registered with the server, the server will send a disco#info request to the component to discover if service discover is supported by the component. This event is triggered when the server received the response of the component.
        Parameters:
        iq - the IQ packet with the disco#info sent by the component.