All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xmpp.component.Component Maven / Gradle / Ivy

Go to download

Tinder is a Java based XMPP library, providing an implementation for XMPP stanzas and components. Tinders origins lie in code that's shared between Jive Software's Openfire and Whack implementations. The implementation that's provided in Tinder hasn't been written again from scratch. Instead, code has been moved from the original projects into Tinder, preserving al of the existing features and functionality. Most of the code that's now in Tinder is based on the org.xmpp package implementation that previously existed in Openfire and Whack. This is the code that defines classes such as Packet, JID, IQ, Component and their extensions. Additionally, some multi-purpose code (such as the DataForm and Result Set Management implementations have been moved to Tinder as well.

There is a newer version: 1.3.0
Show newest version
/**
 * Copyright (C) 2004-2008 Jive Software. All rights reserved.
 *
 * This software is published under the terms of the GNU Public License (GPL),
 * a copy of which is included in this distribution, or a commercial license
 * agreement with Jive.
 */

package org.xmpp.component;

import org.xmpp.packet.JID;
import org.xmpp.packet.Packet;

/**
 * Component enhance the functionality of an XMPP server.
 *
 * Components are JavaBeans and will have their properties exposed as ad-hoc commands.
 *
 * @author Matt Tucker
 */
public interface Component {

    /**
     * Returns the name of this component.
     *
     * @return the name of this component.
     */
    public String getName();

    /**
     * Returns the description of this component.
     *
     * @return the description of this component.
     */
    public String getDescription();

    /**
     * Processes a packet sent to this Component.
     *
     * @param packet the packet.
     * @see ComponentManager#sendPacket(Component, Packet)
     */
    public void processPacket(Packet packet);

    /**
     * Initializes this component with a ComponentManager and the JID
     * that this component is available at (e.g. service.example.com). If a
     * ComponentException is thrown then the component will not be loaded.

* * The initialization code must not rely on receiving packets from the server since * the component has not been fully initialized yet. This means that at this point the * component must not rely on information that is obtained from the server such us * discovered items. * * @param jid the XMPP address that this component is available at. * @param componentManager the component manager. * @throws ComponentException if an error occured while initializing the component. */ public void initialize(JID jid, ComponentManager componentManager) throws ComponentException; /** * Notification message indicating that the component will start receiving incoming * packets. At this time the component may finish pending initialization issues that * require information obtained from the server.

* * It is likely that most of the component will leave this method empty. */ public void start(); /** * Shuts down this component. All component resources must be released as * part of shutdown. */ public void shutdown(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy