Commit fb0b8ce9 authored by Ryan Graham's avatar Ryan Graham Committed by ryang

added PropertyEventDispatcher method calls


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1364 b35dd754-fafc-0310-a699-88a17e54d16e
parent 5603e731
...@@ -34,6 +34,7 @@ import org.jivesoftware.messenger.user.UserManager; ...@@ -34,6 +34,7 @@ import org.jivesoftware.messenger.user.UserManager;
import org.jivesoftware.messenger.user.UserNotFoundException; import org.jivesoftware.messenger.user.UserNotFoundException;
import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
import org.jivesoftware.util.PropertyEventDispatcher;
import org.jivesoftware.util.PropertyEventListener; import org.jivesoftware.util.PropertyEventListener;
import org.xmpp.component.Component; import org.xmpp.component.Component;
import org.xmpp.component.ComponentException; import org.xmpp.component.ComponentException;
...@@ -113,6 +114,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener { ...@@ -113,6 +114,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
catch (Exception e) { catch (Exception e) {
componentManager.getLog().error(e); componentManager.getLog().error(e);
} }
PropertyEventDispatcher.addListener(this);
if (probeResult == null) { if (probeResult == null) {
probeResult = DocumentHelper.createElement(QName.get("query", "jabber:iq:search")); probeResult = DocumentHelper.createElement(QName.get("query", "jabber:iq:search"));
...@@ -158,6 +160,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener { ...@@ -158,6 +160,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
} }
public void destroyPlugin() { public void destroyPlugin() {
PropertyEventDispatcher.removeListener(this);
pluginManager = null; pluginManager = null;
try { try {
componentManager.removeComponent(serviceName); componentManager.removeComponent(serviceName);
......
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