com.neeve.sma
Class MessagingProviderRegistry

java.lang.Object
  extended by com.neeve.root.RootObject
      extended by com.neeve.sma.SmaObject
          extended by com.neeve.sma.MessagingProviderRegistry

public final class MessagingProviderRegistry
extends SmaObject

The messaging provider registry.

The provider registry, a singleton class, stores references to configured providers. Providers are either programatically registered with the registry (using registerProvider(com.neeve.sma.MessagingProvider) or are loaded on demand from the default configuration repository.

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

Method Summary
static MessagingProviderRegistry getInstance()
          Get the singleton provider registry instance.
 MessagingProvider getProvider(String name)
          Get a provider.
 void registerProvider(MessagingProvider provider)
          Register a messaging 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 MessagingProviderRegistry getInstance()
Get the singleton provider registry instance.

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

registerProvider

public final void registerProvider(MessagingProvider provider)
                            throws SmaException
Register a messaging provider.

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

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


getProvider

public final MessagingProvider getProvider(String name)
                                    throws SmaException
Get a provider.

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

This method returns a reference to a created provider. In case the provider is not in the registry, the method attempts to load the provider from the default configuration repository.



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