com.neeve.sma
Class MessageViewFactoryRegistry

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

public final class MessageViewFactoryRegistry
extends SmaObject

The message view factory registry.

The view factory registry, a singleton class, stores references to configured message view factories. It loads and instantiates view factories and serves them out by name and id.

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

Method Summary
static MessageViewFactoryRegistry getInstance()
          Get the singleton view factory registry instance.
 MessageViewFactory getMessageViewFactory(short factoryId)
          Get a view factory.
 Set<String> getMessageViewFactoryNames(Set<String> factories)
          Get the names of the set of registered factories.
 void registerMessageViewFactory(MessageViewFactory factory)
          Register a message view factory
 
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 MessageViewFactoryRegistry getInstance()
Get the singleton view factory registry instance.

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

registerMessageViewFactory

public final void registerMessageViewFactory(MessageViewFactory factory)
Register a message view factory

Parameters:
factory - The message factory to register
Threading:
This method is safe for concurrent access by multiple threads.

This method adds the supplied message view factory to the view factory registry. It will replace a factory of the same id if one exists.


getMessageViewFactory

public final MessageViewFactory getMessageViewFactory(short factoryId)
Get a view factory.

Parameters:
factoryId - The factory's unique identifier.
Threading:
This method is safe for concurrent access by multiple threads.

getMessageViewFactoryNames

public final Set<String> getMessageViewFactoryNames(Set<String> factories)
Get the names of the set of registered factories.

Parameters:
factories - The set to add the factory names to.
Returns:
Returns the updated set of factories.
Threading:
This method is safe for concurrent access by multiple threads.


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