Commit b177d9c7 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Added debugging information while registering/unregistering components.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6789 b35dd754-fafc-0310-a699-88a17e54d16e
parent 98f493b2
......@@ -101,9 +101,10 @@ public class InternalComponentManager extends BasicModule implements ComponentMa
// Check that the requested subdoman is not taken by another component
Component existingComponent = components.get(subdomain);
if (existingComponent != null && existingComponent != component) {
throw new ComponentException(
"Domain already taken by another component: " + existingComponent);
throw new ComponentException("Domain (" + subdomain +
") already taken by another component: " + existingComponent);
}
Log.debug("Registering component for domain: " + subdomain);
// Register that the domain is now taken by the component
components.put(subdomain, component);
......@@ -128,6 +129,7 @@ public class InternalComponentManager extends BasicModule implements ComponentMa
// Send a disco#info request to the new component. If the component provides information
// then it will be added to the list of discoverable server items.
checkDiscoSupport(component, componentJID);
Log.debug("Component registered for domain: " + subdomain);
}
catch (Exception e) {
// Unregister the componet's domain
......@@ -145,6 +147,7 @@ public class InternalComponentManager extends BasicModule implements ComponentMa
}
public void removeComponent(String subdomain) {
Log.debug("Unregistering component for domain: " + subdomain);
Component component = components.remove(subdomain);
// Remove any info stored with the component being removed
componentInfo.remove(subdomain);
......@@ -170,6 +173,7 @@ public class InternalComponentManager extends BasicModule implements ComponentMa
for (ComponentEventListener listener : listeners) {
listener.componentUnregistered(component, componentJID);
}
Log.debug("Component unregistered for domain: " + subdomain);
}
public void sendPacket(Component component, Packet packet) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment