Openfire 3.4.1 Javadoc

org.xmpp.component
Interface Component

All Known Subinterfaces:
ComponentSession.ExternalComponent, MultiUserChatServer
All Known Implementing Classes:
LocalComponentSession.LocalExternalComponent, MultiUserChatServerImpl

public interface Component

Component enhance the functionality of an XMPP server. Components are JavaBeans and will have their properties exposed as ad-hoc commands.

Author:
Matt Tucker

Method Summary
 String getDescription()
          Returns the description of this component.
 String getName()
          Returns the name of this component.
 void initialize(JID jid, ComponentManager componentManager)
          Initializes this component with a ComponentManager and the JID that this component is available at (e.g.
 void processPacket(Packet packet)
          Processes a packet sent to this Component.
 void shutdown()
          Shuts down this component.
 void start()
          Notification message indicating that the component will start receiving incoming packets.
 

Method Detail

getName

String getName()
Returns the name of this component.

Returns:
the name of this component.

getDescription

String getDescription()
Returns the description of this component.

Returns:
the description of this component.

processPacket

void processPacket(Packet packet)
Processes a packet sent to this Component.

Parameters:
packet - the packet.
See Also:
ComponentManager.sendPacket(Component, Packet)

initialize

void initialize(JID jid,
                ComponentManager componentManager)
                throws ComponentException
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.

Parameters:
jid - the XMPP address that this component is available at.
componentManager - the component manager.
Throws:
ComponentException - if an error occured while initializing the component.

start

void start()
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.


shutdown

void shutdown()
Shuts down this component. All component resources must be released as part of shutdown.


Openfire 3.4.1 Javadoc

Copyright © 2003-2007 Jive Software.