@Override
 public synchronized void processOnlineResult(String filter, Element result) {
   if (isRequestCancelled) return;
   PluginRepositoryLoader.waitBasicLoaded();
   if (isRequestCancelled) return;
   for (Element plugin : XMLUtil.getElements(result, "plugin")) {
     if (isRequestCancelled) {
       if (SBProvider.DEBUG) System.out.println(this.getName() + ": request cancelled");
       return;
     }
     String name = XMLUtil.getElementValue(plugin, "name", "");
     String className = XMLUtil.getElementValue(plugin, "classname", "");
     String str = XMLUtil.getElementValue(plugin, "string", "");
     if (SBProvider.DEBUG) System.out.println(className);
     if ((StringUtil.isEmpty(name) || !name.toLowerCase().contains(filter.toLowerCase()))
         && (StringUtil.isEmpty(str)
             || !str.toLowerCase().contains(filter.toLowerCase())
             || StringUtil.isEmpty(className))) continue;
     final PluginDescriptor pd = PluginRepositoryLoader.getPlugin(className);
     if (pd == null) {
       if (SBProvider.DEBUG) System.out.println(className + " not found.");
     } else if (PluginLoader.getPlugin(className) != null) {
       if (SBProvider.DEBUG) System.out.println(pd.getClassName() + ": already exists.");
     } else {
       pd.loadAll();
       for (ProviderListener l : getListeners()) l.updateDisplay();
       SBLink link = new LinkOPlugin(this, pd, str, filter);
       if (SBProvider.DEBUG) System.out.println(name + " added");
       elements.add(link);
     }
   }
   if (isRequestCancelled) return;
   loaded();
 }
Ejemplo n.º 2
0
 @Override
 public void onProviderException(Exception cause) {
   listener.onProviderException(cause);
 }
Ejemplo n.º 3
0
 @Override
 public void onResourceRemotelyClosed(JmsResource resource, Exception cause) {
   listener.onResourceRemotelyClosed(resource, cause);
 }
Ejemplo n.º 4
0
 @Override
 public void onConnectionFailure(IOException ex) {
   listener.onConnectionFailure(ex);
 }
Ejemplo n.º 5
0
 @Override
 public void onConnectionEstablished(URI remoteURI) {
   listener.onConnectionEstablished(this.next.getRemoteURI());
 }
Ejemplo n.º 6
0
 @Override
 public void onConnectionRestored(URI remoteURI) {
   listener.onConnectionRestored(remoteURI);
 }
Ejemplo n.º 7
0
 @Override
 public void onConnectionRecovered(Provider provider) throws Exception {
   listener.onConnectionRecovered(provider);
 }
Ejemplo n.º 8
0
 @Override
 public void onConnectionInterrupted(URI remoteURI) {
   listener.onConnectionInterrupted(remoteURI);
 }
Ejemplo n.º 9
0
 @Override
 public void onInboundMessage(JmsInboundMessageDispatch envelope) {
   listener.onInboundMessage(envelope);
 }
 private void pluginUpdated() {
   for (ProviderListener p : getListeners()) p.providerItemChanged();
 }