|
Openfire 3.9.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.container.BasicModule org.jivesoftware.openfire.component.InternalComponentManager
public class InternalComponentManager
Manages the registration and delegation of Components. The ComponentManager
is responsible for managing registration and delegation of Components
,
as well as offering a facade around basic server functionallity such as sending and
receiving of packets.
This component manager will be an internal service whose JID will be component.[domain]. So the component manager will be able to send packets to other internal or external components and also receive packets from other components or even from trusted clients (e.g. ad-hoc commands).
Constructor Summary | |
---|---|
InternalComponentManager()
|
Method Summary | |
---|---|
void |
addComponent(String subdomain,
org.xmpp.component.Component component)
|
void |
addListener(ComponentEventListener listener)
Adds a new listener that will be notified of component events. |
void |
addPresenceRequest(org.xmpp.packet.JID prober,
org.xmpp.packet.JID probee)
Registers Probeers who have not yet been serviced. |
org.xmpp.packet.JID |
getAddress()
Returns the XMPP address. |
String |
getHomeDirectory()
|
static InternalComponentManager |
getInstance()
|
String |
getProperty(String name)
|
String |
getServerName()
|
boolean |
hasComponent(org.xmpp.packet.JID componentJID)
Returns true if a component is associated to the specified address. |
void |
initialize(XMPPServer server)
Initializes the basic module. |
boolean |
isExternalMode()
|
void |
process(org.xmpp.packet.Packet packet)
Processes packets that were sent to this service. |
void |
query(org.xmpp.component.Component component,
org.xmpp.packet.IQ packet,
org.xmpp.component.IQResultListener listener)
|
org.xmpp.packet.IQ |
query(org.xmpp.component.Component component,
org.xmpp.packet.IQ packet,
long timeout)
|
void |
removeComponent(String subdomain)
Removes a component. |
void |
removeComponent(String subdomain,
org.xmpp.component.Component component)
Removes a given component. |
void |
removeListener(ComponentEventListener listener)
Removes the specified listener from the listeners being notified of component events. |
void |
sendPacket(org.xmpp.component.Component component,
org.xmpp.packet.Packet packet)
|
void |
setProperty(String name,
String value)
|
void |
start()
Starts the basic module. |
void |
stop()
Stops the basic module. |
Methods inherited from class org.jivesoftware.openfire.container.BasicModule |
---|
destroy, getName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InternalComponentManager()
Method Detail |
---|
public static InternalComponentManager getInstance()
public void initialize(XMPPServer server)
BasicModule
Initializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
initialize
in interface Module
initialize
in class BasicModule
server
- the server hosting this module.public void start()
BasicModule
Starts the basic module.
Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.
start
in interface Module
start
in class BasicModule
public void stop()
BasicModule
Stops the basic module.
Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.
stop
in interface Module
stop
in class BasicModule
public void addComponent(String subdomain, org.xmpp.component.Component component) throws org.xmpp.component.ComponentException
addComponent
in interface org.xmpp.component.ComponentManager
org.xmpp.component.ComponentException
public void removeComponent(String subdomain)
Component.shutdown()
method will be called on the
component. Note that if the component was an external component that was connected
several times then all its connections will be terminated.
removeComponent
in interface org.xmpp.component.ComponentManager
subdomain
- the subdomain of the component's address.public void removeComponent(String subdomain, org.xmpp.component.Component component)
removeComponent(String)
this method will just
remove a single component instead of all components associated to the subdomain. External
components may connect several times and register for the same subdomain. This method
just removes a singled connection not all of them.
subdomain
- the subdomain of the component's address.component
- specific component to remove.public void sendPacket(org.xmpp.component.Component component, org.xmpp.packet.Packet packet)
sendPacket
in interface org.xmpp.component.ComponentManager
public org.xmpp.packet.IQ query(org.xmpp.component.Component component, org.xmpp.packet.IQ packet, long timeout) throws org.xmpp.component.ComponentException
query
in interface org.xmpp.component.ComponentManager
org.xmpp.component.ComponentException
public void query(org.xmpp.component.Component component, org.xmpp.packet.IQ packet, org.xmpp.component.IQResultListener listener) throws org.xmpp.component.ComponentException
query
in interface org.xmpp.component.ComponentManager
org.xmpp.component.ComponentException
public void addListener(ComponentEventListener listener)
listener
- the new listener to notify of component events.public void removeListener(ComponentEventListener listener)
listener
- the listener to remove.public String getProperty(String name)
getProperty
in interface org.xmpp.component.ComponentManager
public void setProperty(String name, String value)
setProperty
in interface org.xmpp.component.ComponentManager
public String getServerName()
getServerName
in interface org.xmpp.component.ComponentManager
public String getHomeDirectory()
public boolean isExternalMode()
isExternalMode
in interface org.xmpp.component.ComponentManager
public boolean hasComponent(org.xmpp.packet.JID componentJID)
componentJID
- the address of the component. This is the complete domain.
public void addPresenceRequest(org.xmpp.packet.JID prober, org.xmpp.packet.JID probee)
prober
- the jid probing.probee
- the presence being probed.public org.xmpp.packet.JID getAddress()
RoutableChannelHandler
getAddress
in interface RoutableChannelHandler
public void process(org.xmpp.packet.Packet packet) throws PacketException
process
in interface ChannelHandler
packet
- the packet to process.
PacketException
- thrown if the packet is malformed (results in the sender's
session being shutdown).
|
Openfire 3.9.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |