org.isam.exehda.services.primos
Class ConfStack

java.lang.Object
  |
  +--org.isam.exehda.services.primos.ConfStack

class ConfStack
extends java.lang.Object

A "smart" stack for storing parameter configurations.

To do:
does it need synchronized somewhere?

Constructor Summary
ConfStack()
          Creates a new ConfStack instance.
 
Method Summary
 void clean(Collector.ConsumerId c)
          Removes all configurations pushed by the given consumer.
 Collector.ConsumerId currentOwner()
          Returns the owner of the current configuration value.
 java.lang.Object currentValue()
          Returns the current active configuration.
 void push(Collector.ConsumerId c, java.lang.Object v)
          Activates a new parameter configuration by pushing it on top of the configuration stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfStack

public ConfStack()
Creates a new ConfStack instance.

Method Detail

push

public final void push(Collector.ConsumerId c,
                       java.lang.Object v)
Activates a new parameter configuration by pushing it on top of the configuration stack.

Parameters:
c - owner of the new configuration
v - new parameter value

clean

public final void clean(Collector.ConsumerId c)
Removes all configurations pushed by the given consumer. This method should tipically be called after an application exits as part of the application cleanup procedure.

Parameters:
c - a ConsumerId value
To do:
review synchronized

currentValue

public final java.lang.Object currentValue()
Returns the current active configuration.

Returns:
current configuration value or null if there is no active configuration.

currentOwner

public final Collector.ConsumerId currentOwner()
Returns the owner of the current configuration value.

Returns:
current configuration owner or null it there is no active configuration.