org.ops4j.pax.coin.service.internal.provider
Class ConfigSwitch

java.lang.Object
  extended by org.ops4j.pax.coin.service.internal.provider.ConfigSwitch
All Implemented Interfaces:
Listener<ConfigProvider>, ConfigProviderListener

public class ConfigSwitch
extends Object
implements ConfigProviderListener

TODO Add JavaDoc

Since:
0.3.0, February 27, 2008
Author:
Alin Dreghiciu

Constructor Summary
ConfigSwitch(String groupId, ConfigSelector configSelector)
          Constructor.
 
Method Summary
 boolean equals(Object o)
          Configuration switches are equal if the group id are equal.
 String getGroupId()
          Getter.
 int hashCode()
           
 void registered(ConfigProvider configProvider)
           
 void registered(ConfigTarget target)
          Signals that a configuration target has been registered.
 void unregistered(ConfigProvider configProvider)
           
 void unregistered(ConfigTarget target)
          Signals that a configuration target has been unregistered.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigSwitch

public ConfigSwitch(String groupId,
                    ConfigSelector configSelector)
Constructor.

Parameters:
groupId - persistent identifier
configSelector - configuration selector
Throws:
org.ops4j.lang.NullArgumentException - - if group id is null or empty - If configuration selector is null
Method Detail

getGroupId

public String getGroupId()
Getter.

Returns:
configuration group id; cannot be null

equals

public boolean equals(Object o)
Configuration switches are equal if the group id are equal.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

registered

public void registered(ConfigTarget target)
Signals that a configuration target has been registered.

Parameters:
target - registered configuration target
Throws:
org.ops4j.lang.NullArgumentException - - If target is null
IllegalArgumentException - - If registered target does not have an group that is equal with switch group

unregistered

public void unregistered(ConfigTarget target)
Signals that a configuration target has been unregistered.

Parameters:
target - unregistered configuration target

registered

public void registered(ConfigProvider configProvider)
Specified by:
registered in interface Listener<ConfigProvider>
See Also:
Listener.registered(Object)

unregistered

public void unregistered(ConfigProvider configProvider)
Specified by:
unregistered in interface Listener<ConfigProvider>
See Also:
Listener.unregistered(Object)


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.