예제 #1
0
 @Override
 public void unregisterService(final URI serviceUri) throws IOException {
   registered.remove(serviceUri.toString());
   for (final DiscoveryAgent agent : agents) {
     agent.unregisterService(serviceUri);
   }
 }
예제 #2
0
 @Managed
 public String[] getAgents() {
   final List<String> list = new ArrayList<String>();
   for (final DiscoveryAgent agent : DiscoveryRegistry.this.agents) {
     list.add(agent.getClass().getName());
   }
   return list.toArray(new String[list.size()]);
 }
예제 #3
0
 public void addDiscoveryAgent(final DiscoveryAgent agent) {
   agents.add(agent);
   agent.setDiscoveryListener(this);
   for (final URI uri : registered.values()) {
     try {
       agent.registerService(uri);
     } catch (Exception e) {
       // Ignore
     }
   }
 }