Examples of DiscoveryListener


Examples of net.jini.discovery.DiscoveryListener

    try {
      lookupDiscovery = new LookupDiscovery(groups);

      // hook listener for finding the service
      lookupDiscovery.addDiscoveryListener(new DiscoveryListener() {
        public void discovered(DiscoveryEvent ev) {
          log.debug("received discovery event " + ev);
          ServiceRegistrar[] reg = ev.getRegistrars();
          // once the proxy if found, bail out
          for (int i = 0; i < reg.length && proxy == null; i++) {
View Full Code Here

Examples of net.jini.discovery.DiscoveryListener

          + getImpl() + " identified by "
          + serviceName + ".impl",
            e);
  }
  eventList = new LinkedList(); // every start call gets a new list
  DiscoveryListener listener = new RunningDiscoveryListener();
  LookupDiscoveryManager manager = null;
  // populate the groups/locators arrays. Discard the overrides list.
  // This admin implement doRandom to return false to inhibit
  // randomization of the group names
  addServiceGroupsAndLocators(new ArrayList());
View Full Code Here

Examples of nu.fw.jeti.events.DiscoveryListener

  public void discoveryInfoResult(JID jid,String id,IQDiscoInfo info)
  {
    TimerTask t =(TimerTask) timeoutTimers.remove(id);
    if(t!=null)t.cancel();
    infoCache.put(jid,info);
    DiscoveryListener d = infoRequests.remove(id);
    if(d!=null) d.discoveryInfoResult(jid,info);
  }
View Full Code Here

Examples of nu.fw.jeti.events.DiscoveryListener

  public void discoveryItemResult(JID jid,String id,IQDiscoItems item)
  {
    TimerTask t =(TimerTask) timeoutTimers.remove(id);
    if(t!=null)t.cancel();
    itemCache.put(jid,item);
    DiscoveryListener d =itemRequests.remove(id);
    if(d!=null)d.discoveryItemResult(jid,item);
  }
View Full Code Here

Examples of nu.fw.jeti.events.DiscoveryListener

    output.setAuthenticated();
    //output.send(new InfoQuery(new JID(server),"get",new IQBrowse()));
    //browse(new JID(loginInfo.getServer()),null);
    sendLoginMessage(I18N.gettext("main.loginstatus.Loading_roster")+"...");
    //TODO increase timeout
    getItems(new JID(loginInfo.getServer()), new DiscoveryListener()
    {
      public void discoveryItemResult(JID jid, DiscoveryItem item)
      {//cache disco items for this server
        if (item.hasItems())
        {
View Full Code Here

Examples of nu.fw.jeti.events.DiscoveryListener

        System.out.println("Service listing");

//        ServiceDiscoveryManager disco = ServiceDiscoveryManager
//                .getInstanceFor(xmppConnection);
     
        xmppConnection.getItems(new JID(xmppConnection.getMyJID().getDomain()), new DiscoveryListener(){
      public void discoveryInfoResult(JID jid, DiscoveryInfo info){}
   
      public void discoveryItemResult(JID jid, DiscoveryItem item){
        boolean available = false;
        if (item.hasItems()){
View Full Code Here

Examples of org.apache.activemq.transport.discovery.DiscoveryListener

            // Have the listener process the event async so that
            // he does not block this thread since we are doing time sensitive
            // processing of events.
            executor.execute(new Runnable() {
                public void run() {
                    DiscoveryListener discoveryListener = MulticastDiscoveryAgent.this.discoveryListener;
                    if (discoveryListener != null) {
                        discoveryListener.onServiceRemove(event);
                    }
                }
            });
        }
    }
View Full Code Here

Examples of org.apache.activemq.transport.discovery.DiscoveryListener

            // Have the listener process the event async so that
            // he does not block this thread since we are doing time sensitive
            // processing of events.
            executor.execute(new Runnable() {
                public void run() {
                    DiscoveryListener discoveryListener = MulticastDiscoveryAgent.this.discoveryListener;
                    if (discoveryListener != null) {
                        discoveryListener.onServiceAdd(event);
                    }
                }
            });
        }
    }
View Full Code Here

Examples of org.apache.activemq.transport.discovery.DiscoveryListener

            // Have the listener process the event async so that
            // he does not block this thread since we are doing time sensitive
            // processing of events.
            executor.execute(new Runnable() {
                public void run() {
                    DiscoveryListener discoveryListener = MulticastDiscoveryAgent.this.discoveryListener;
                    if (discoveryListener != null) {
                        discoveryListener.onServiceRemove(event);
                    }
                }
            });
        }
    }
View Full Code Here

Examples of org.apache.activemq.transport.discovery.DiscoveryListener

            // Have the listener process the event async so that
            // he does not block this thread since we are doing time sensitive
            // processing of events.
            executor.execute(new Runnable() {
                public void run() {
                    DiscoveryListener discoveryListener = MulticastDiscoveryAgent.this.discoveryListener;
                    if (discoveryListener != null) {
                        discoveryListener.onServiceAdd(event);
                    }
                }
            });
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.