Openfire 3.5.0.rc1 Javadoc

org.jivesoftware.openfire.session
Class LocalComponentSession.LocalExternalComponent

java.lang.Object
  extended by org.jivesoftware.openfire.session.LocalComponentSession.LocalExternalComponent
All Implemented Interfaces:
ComponentSession.ExternalComponent, Component
Enclosing class:
LocalComponentSession

public static class LocalComponentSession.LocalExternalComponent
extends Object
implements ComponentSession.ExternalComponent

The ExternalComponent acts as a proxy of the remote connected component. Any Packet that is sent to this component will be delivered to the real component on the other side of the connection.

An ExternalComponent will be added as a route in the RoutingTable for each connected external component. This implies that when the server receives a packet whose domain matches the external component services address then a route to the external component will be used and the packet will be forwarded to the component on the other side of the connection.

Author:
Gaston Dombiak

Constructor Summary
LocalComponentSession.LocalExternalComponent(LocalComponentSession session, Connection connection)
           
 
Method Summary
 String getCategory()
           
 String getDescription()
          Returns the description of this component.
 String getInitialSubdomain()
           
 String getName()
          Returns the name of this component.
 Collection<String> getSubdomains()
           
 String getType()
           
 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 setCategory(String category)
           
 void setName(String name)
           
 void setType(String type)
           
 void shutdown()
          Shuts down this component.
 void start()
          Notification message indicating that the component will start receiving incoming packets.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalComponentSession.LocalExternalComponent

public LocalComponentSession.LocalExternalComponent(LocalComponentSession session,
                                                    Connection connection)
Method Detail

processPacket

public void processPacket(Packet packet)
Description copied from interface: Component
Processes a packet sent to this Component.

Specified by:
processPacket in interface Component
Parameters:
packet - the packet.
See Also:
ComponentManager.sendPacket(Component, Packet)

getName

public String getName()
Description copied from interface: Component
Returns the name of this component.

Specified by:
getName in interface Component
Returns:
the name of this component.

getDescription

public String getDescription()
Description copied from interface: Component
Returns the description of this component.

Specified by:
getDescription in interface Component
Returns:
the description of this component.

setName

public void setName(String name)
Specified by:
setName in interface ComponentSession.ExternalComponent

getType

public String getType()
Specified by:
getType in interface ComponentSession.ExternalComponent

setType

public void setType(String type)
Specified by:
setType in interface ComponentSession.ExternalComponent

getCategory

public String getCategory()
Specified by:
getCategory in interface ComponentSession.ExternalComponent

setCategory

public void setCategory(String category)
Specified by:
setCategory in interface ComponentSession.ExternalComponent

getInitialSubdomain

public String getInitialSubdomain()
Specified by:
getInitialSubdomain in interface ComponentSession.ExternalComponent

getSubdomains

public Collection<String> getSubdomains()
Specified by:
getSubdomains in interface ComponentSession.ExternalComponent

initialize

public void initialize(JID jid,
                       ComponentManager componentManager)
Description copied from interface: Component
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.

Specified by:
initialize in interface Component
Parameters:
jid - the XMPP address that this component is available at.
componentManager - the component manager.

start

public void start()
Description copied from interface: Component
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.

Specified by:
start in interface Component

shutdown

public void shutdown()
Description copied from interface: Component
Shuts down this component. All component resources must be released as part of shutdown.

Specified by:
shutdown in interface Component

toString

public String toString()
Overrides:
toString in class Object

Openfire 3.5.0.rc1 Javadoc

Copyright © 2003-2007 Jive Software.