Jive Messenger 2.2.2 Javadoc

org.xmpp.component
Interface ComponentManager

All Known Implementing Classes:
InternalComponentManager

public interface ComponentManager

Manages components.

Author:
Matt Tucker
See Also:
Component

Method Summary
 void addComponent(String subdomain, Component component)
          Adds a component.
 Log getLog()
          Returns a Log instance, which can be used by components for logging error, warning, info, and debug messages.
 String getProperty(String name)
          Returns a property value specified by name.
 String getServerName()
          Returns the domain of the XMPP server.
 boolean isExternalMode()
          Returns true if components managed by this component manager are external components connected to the server over a network connection.
 void removeComponent(String subdomain)
          Removes a component.
 void sendPacket(Component component, Packet packet)
          Sends a packet to the XMPP server.
 void setProperty(String name, String value)
          Sets a property value.
 

Method Detail

addComponent

void addComponent(String subdomain,
                  Component component)
                  throws ComponentException
Adds a component. The Component.initialize(org.xmpp.packet.JID, ComponentManager) method will be called on the component. The subdomain specifies the address of the component on a server. For example, if the subdomain is "test" and the XMPP server is at "example.com", then the component's address would be "test.example.com".

Parameters:
subdomain - the subdomain of the component's address.
component - the component.
Throws:
ComponentException

removeComponent

void removeComponent(String subdomain)
                     throws ComponentException
Removes a component. The Component.shutdown() method will be called on the component.

Parameters:
subdomain - the subdomain of the component's address.
Throws:
ComponentException

sendPacket

void sendPacket(Component component,
                Packet packet)
                throws ComponentException
Sends a packet to the XMPP server. The "from" value of the packet must be in the domain name of the component. For example, if the component has a domain of "test.example.com", then "user@test.example.com" would be a valid "from" value.

Parameters:
component - the component sending the packet.
packet - the packet to send.
Throws:
ComponentException

getProperty

String getProperty(String name)
Returns a property value specified by name. Properties can be used by components to store configuration data. It is recommended that each component qualify property names to prevent overlap. For example a component that broadcasts messages to groups of users, might prepend all property names it uses with "broadcast.".

Parameters:
name - the property name.
Returns:
the property value.

setProperty

void setProperty(String name,
                 String value)
Sets a property value. Properties can be used by components to store configuration data. It is recommended that each component qualify property names to prevent overlap. For example a component that broadcasts messages to groups of users, might prepend all property names it uses with "broadcast.".

Parameters:
name - the property name.
value - the property value.

getServerName

String getServerName()
Returns the domain of the XMPP server. The domain name may be the IP address or the host name.

Returns:
the domain of the XMPP server.

isExternalMode

boolean isExternalMode()
Returns true if components managed by this component manager are external components connected to the server over a network connection. Otherwise, the components are internal to the server.

Returns:
true if the managed components are external components.

getLog

Log getLog()
Returns a Log instance, which can be used by components for logging error, warning, info, and debug messages.

Returns:
a Log instance.

Jive Messenger 2.2.2 Javadoc

Copyright © 1999-2004 Jive Software.