com.neeve.discovery
Class DiscoveryProviderRegistry

java.lang.Object
  extended by com.neeve.root.RootObject
      extended by com.neeve.discovery.DiscoveryObject
          extended by com.neeve.discovery.DiscoveryProviderRegistry

public final class DiscoveryProviderRegistry
extends DiscoveryObject

The provider registry.

The provider registry, a singleton class, stores references to configured discovery providers. Providers are created on demand and stored in the registry.

Threading:
The provider registry is not safe for concurrent access by multiple threads.

Method Summary
static DiscoveryProviderRegistry getInstance()
          Get the singleton provider registry instance.
 IDiscoveryProvider getProvider(String name)
          Get a discovery provider.
 void registerProvider(IDiscoveryProvider provider)
          Register a discovery provider.
 
Methods inherited from class com.neeve.root.RootObject
getChecked, getThreaded, getTracer, setChecked, setTracer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static final DiscoveryProviderRegistry getInstance()
Get the singleton provider registry instance.

Threading:
This method is safe for concurrent access by multiple threads

registerProvider

public final void registerProvider(IDiscoveryProvider provider)
                            throws EDiscoveryException
Register a discovery provider.

This method programatically registers a messaging provider in the system. Providers registered using this mechanism will augment the providers loaded from the configuration repository.

Parameters:
provider - The provider to register.
Throws:
EDiscoveryException - Thrown in case an exception is encountered during this method.
Threading:
This method is safe for concurrent access by multiple threads.

getProvider

public final IDiscoveryProvider getProvider(String name)
                                     throws EDiscoveryException
Get a discovery provider.

This method returns a reference to a created provider. In case the provider is in the registry, the method attempts to create the provider using provider metadata from the configuration area

Parameters:
name - The name of the provider.
Throws:
EDiscoveryException - Thrown in case an exception is encountered during this method.
Threading:
This method is safe for concurrent access by multiple threads.


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.