org.apache.openejb.server
Class DiscoveryRegistry

java.lang.Object
  extended by org.apache.openejb.server.DiscoveryRegistry
All Implemented Interfaces:
DiscoveryAgent, DiscoveryListener

public class DiscoveryRegistry
extends Object
implements DiscoveryListener, DiscoveryAgent

Version:
$Rev$ $Date$

Constructor Summary
DiscoveryRegistry()
           
DiscoveryRegistry(DiscoveryAgent agent)
           
 
Method Summary
 void addDiscoveryAgent(DiscoveryAgent agent)
           
 void addDiscoveryListener(DiscoveryListener listener)
           
 Set<URI> getServices()
           
 void registerService(URI serviceUri)
          register a service
 void removeDiscoveryListener(DiscoveryListener listener)
           
 void reportFailed(URI serviceUri)
          A process actively using a service may see it go down before the DiscoveryAgent notices the service's failure.
 void serviceAdded(URI service)
           
 void serviceRemoved(URI service)
           
 void setDiscoveryListener(DiscoveryListener listener)
          Sets the discovery listener
 void unregisterService(URI serviceUri)
          register a service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscoveryRegistry

public DiscoveryRegistry()

DiscoveryRegistry

public DiscoveryRegistry(DiscoveryAgent agent)
Method Detail

addDiscoveryAgent

public void addDiscoveryAgent(DiscoveryAgent agent)

getServices

public Set<URI> getServices()

registerService

public void registerService(URI serviceUri)
                     throws IOException
Description copied from interface: DiscoveryAgent
register a service

Specified by:
registerService in interface DiscoveryAgent
Throws:
IOException

reportFailed

public void reportFailed(URI serviceUri)
                  throws IOException
Description copied from interface: DiscoveryAgent
A process actively using a service may see it go down before the DiscoveryAgent notices the service's failure. That process can use this method to notify the DiscoveryAgent of the failure so that other listeners of this DiscoveryAgent can also be made aware of the failure.

Specified by:
reportFailed in interface DiscoveryAgent
Throws:
IOException

unregisterService

public void unregisterService(URI serviceUri)
                       throws IOException
Description copied from interface: DiscoveryAgent
register a service

Specified by:
unregisterService in interface DiscoveryAgent
Throws:
IOException

setDiscoveryListener

public void setDiscoveryListener(DiscoveryListener listener)
Description copied from interface: DiscoveryAgent
Sets the discovery listener

Specified by:
setDiscoveryListener in interface DiscoveryAgent

addDiscoveryListener

public void addDiscoveryListener(DiscoveryListener listener)

removeDiscoveryListener

public void removeDiscoveryListener(DiscoveryListener listener)

serviceAdded

public void serviceAdded(URI service)
Specified by:
serviceAdded in interface DiscoveryListener

serviceRemoved

public void serviceRemoved(URI service)
Specified by:
serviceRemoved in interface DiscoveryListener


Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.