net.java.dev.moskito.core.registry
Class ProducerRegistryImpl

java.lang.Object
  extended by net.java.dev.moskito.core.registry.ProducerRegistryImpl
All Implemented Interfaces:
IProducerRegistry

public class ProducerRegistryImpl
extends Object
implements IProducerRegistry

The ProducerRegistryImplementation is a singleton object, but for webapp-reloading issues it doesn't contain a getInstance() method. Instead please use the ProducerRegistryFactory for instantiation.

Author:
lrosenberg

Field Summary
private  List<IProducerRegistryListener> listeners
          The listeners list.
private static org.apache.log4j.Logger log
           
private  Map<String,IStatsProducer> registry
          The map in which the producers are stored.
 
Constructor Summary
ProducerRegistryImpl()
           
 
Method Summary
 void addListener(IProducerRegistryListener listener)
           
 IStatsProducer getProducer(String producerId)
           
 Collection<IStatsProducer> getProducers()
           
 void registerProducer(IStatsProducer producer)
           
 void removeListener(IProducerRegistryListener listener)
           
 void unregisterProducer(IStatsProducer producer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.log4j.Logger log

listeners

private List<IProducerRegistryListener> listeners
The listeners list.


registry

private Map<String,IStatsProducer> registry
The map in which the producers are stored.

Constructor Detail

ProducerRegistryImpl

ProducerRegistryImpl()
Method Detail

addListener

public void addListener(IProducerRegistryListener listener)
Specified by:
addListener in interface IProducerRegistry

removeListener

public void removeListener(IProducerRegistryListener listener)
Specified by:
removeListener in interface IProducerRegistry

getProducers

public Collection<IStatsProducer> getProducers()
Specified by:
getProducers in interface IProducerRegistry

getProducer

public IStatsProducer getProducer(String producerId)
Specified by:
getProducer in interface IProducerRegistry

registerProducer

public void registerProducer(IStatsProducer producer)
Specified by:
registerProducer in interface IProducerRegistry

unregisterProducer

public void unregisterProducer(IStatsProducer producer)
Specified by:
unregisterProducer in interface IProducerRegistry


Copyright © 2006 MoSKito Project Team. All Rights Reserved.
MoSKito, the open source java monitoring framework