com.zphinx.spine.start.helpers
Class PluginServiceLocator

java.lang.Object
  extended by com.zphinx.spine.start.helpers.PluginServiceLocator

public class PluginServiceLocator
extends Object

PluginServiceLocator serves as a singleton used to keep track of the plugins registered with the Spine framework

Version:
$1.0

Copyright ©Zphinx Software Solutions

Author:
David Ladapo

Method Summary
 void addPlugin(String key, SpinePlugin plugin)
          Adds a plugin to this service locator
static PluginServiceLocator getInstance()
          Gets the static instance of this object
 SpinePlugin getPlugin(String key)
          Gets the SpinePlugin which was registered with this object by the specified key
 Map getPlugins()
          Gets the Map containing all the registered plugins
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PluginServiceLocator getInstance()
Gets the static instance of this object

Returns:
the static instance of this object

getPlugins

public Map getPlugins()
Gets the Map containing all the registered plugins

Returns:
A Map containing all the registered plugins

getPlugin

public SpinePlugin getPlugin(String key)
Gets the SpinePlugin which was registered with this object by the specified key

Parameters:
key - The key by which the plugin is registered.
Returns:
The SpinePlugin which was registered with this key

addPlugin

public void addPlugin(String key,
                      SpinePlugin plugin)
Adds a plugin to this service locator

Parameters:
key - The key by which the plugin will be known to the system
plugin - The plugin to add.