org.jmonit.repositories
Class AbstractRepository

java.lang.Object
  extended by org.jmonit.repositories.AbstractRepository
All Implemented Interfaces:
Repository
Direct Known Subclasses:
DefaultRepository

public abstract class AbstractRepository
extends java.lang.Object
implements Repository

Author:
Nicolas De Loof

Constructor Summary
AbstractRepository()
           
 
Method Summary
 PluginManager getFeatureManager()
           
 Monitor getMonitor(java.lang.String name)
          
 java.util.Collection<Monitor> getMonitors()
          
 java.util.Collection<Monitor> getMonitorsWithFeatures(java.lang.Class[] features)
          
 java.util.Collection<Monitor> getMonitorsWithTag(java.lang.String tag)
          
 java.util.Collection<Monitor> getMonitorsWithTags(java.lang.String[] tags)
          
 java.util.Set<java.lang.String> getTags()
           
protected abstract  Monitor newMonitorInstance(java.lang.String name)
           
 void setFeatureManager(PluginManager featureManager)
          Register a custom featureManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRepository

public AbstractRepository()
Method Detail

getMonitor

public Monitor getMonitor(java.lang.String name)

Specified by:
getMonitor in interface Repository
Parameters:
name - monitor name
Returns:
The monitor uniquely defines by it's name
See Also:
Repository.getMonitor(java.lang.String)

getTags

public java.util.Set<java.lang.String> getTags()
Specified by:
getTags in interface Repository
Returns:
The tags used by existing monitors

newMonitorInstance

protected abstract Monitor newMonitorInstance(java.lang.String name)
Parameters:
name -
Returns:

getMonitorsWithTag

public java.util.Collection<Monitor> getMonitorsWithTag(java.lang.String tag)

Specified by:
getMonitorsWithTag in interface Repository
Parameters:
tag - tag
Returns:
all monitors having the requested tag
See Also:
Repository.getMonitorsWithTag(java.lang.String)

getMonitorsWithTags

public java.util.Collection<Monitor> getMonitorsWithTags(java.lang.String[] tags)

Specified by:
getMonitorsWithTags in interface Repository
Parameters:
tags - the tags the returned monitor must have
Returns:
all monitors having the requested tags
See Also:
Repository.getMonitorsWithTags(java.lang.String[])

getMonitorsWithFeatures

public java.util.Collection<Monitor> getMonitorsWithFeatures(java.lang.Class[] features)

Specified by:
getMonitorsWithFeatures in interface Repository
Returns:
all monitors that support the expected set of features
See Also:
Repository.getMonitorsWithFeatures(java.lang.Class[])

getMonitors

public java.util.Collection<Monitor> getMonitors()

Specified by:
getMonitors in interface Repository
Returns:
all monitors
See Also:
Repository.getMonitors()

setFeatureManager

public void setFeatureManager(PluginManager featureManager)
Description copied from interface: Repository
Register a custom featureManager

Specified by:
setFeatureManager in interface Repository
Parameters:
featureManager - the featureManager to set

getFeatureManager

public PluginManager getFeatureManager()
Specified by:
getFeatureManager in interface Repository
Returns:
the featureManager


Copyright © 2007 Nicolas De Loof. All Rights Reserved.