org.apache.felix.ipojo.webconsole
Class StateUtils

java.lang.Object
  extended by org.apache.felix.ipojo.webconsole.StateUtils

public class StateUtils
extends Object

Helper class dealing with instance and factory states.

Author:
Felix Project Team

Constructor Summary
StateUtils()
           
 
Method Summary
static String getDependencyBindingPolicy(int policy)
          Gets the dependency binding policy as a String.
static String getDependencyState(int state)
          Gets the dependency state as a String.
static String getFactoryState(int state)
          Gets the factory state as a String.
static  getInstanceList( archs, String factory)
          Gets the instance list created by the given factory.
static String getInstanceState(int state)
          Gets the instance state as a String.
static int getInvalidFactoriesCount( factories)
          Gets the number of invalid factories.
static int getInvalidHandlersCount( handlers)
          Gets the number of invalid handlers.
static int getInvalidInstancesCount( archs)
          Gets the number of invalid instances.
static String getProvidedServiceState(int state)
          Gets the provided service state as a String.
static int getValidFactoriesCount( factories)
          Gets the number of valid factories.
static int getValidHandlersCount( handlers)
          Gets the number of valid handlers.
static int getValidInstancesCount( archs)
          Gets the number of valid instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateUtils

public StateUtils()
Method Detail

getValidInstancesCount

public static int getValidInstancesCount( archs)
Gets the number of valid instances.

Parameters:
archs - the instance architecture list
Returns:
the number of valid instances.

getInvalidInstancesCount

public static int getInvalidInstancesCount( archs)
Gets the number of invalid instances.

Parameters:
archs - the instance architecture list
Returns:
the number of invalid instances.

getValidFactoriesCount

public static int getValidFactoriesCount( factories)
Gets the number of valid factories.

Parameters:
factories - the factory list
Returns:
the number of valid factories.

getInvalidFactoriesCount

public static int getInvalidFactoriesCount( factories)
Gets the number of invalid factories.

Parameters:
factories - the factory list
Returns:
the number of invalid factories.

getValidHandlersCount

public static int getValidHandlersCount( handlers)
Gets the number of valid handlers.

Parameters:
handlers - the handler factory list
Returns:
the number of valid handlers.

getInvalidHandlersCount

public static int getInvalidHandlersCount( handlers)
Gets the number of invalid handlers.

Parameters:
handlers - the handler factory list
Returns:
the number of invalid handlers.

getInstanceState

public static String getInstanceState(int state)
Gets the instance state as a String.

Parameters:
state - the state.
Returns:
the String form of the state.

getFactoryState

public static String getFactoryState(int state)
Gets the factory state as a String.

Parameters:
state - the state.
Returns:
the String form of the state.

getInstanceList

public static  getInstanceList( archs,
                                    String factory)
Gets the instance list created by the given factory.

Parameters:
archs - the list of instance architectures
factory - the factory name
Returns:
the list containing the created instances (name)

getDependencyState

public static String getDependencyState(int state)
Gets the dependency state as a String.

Parameters:
state - the state.
Returns:
the String form of the state.

getDependencyBindingPolicy

public static String getDependencyBindingPolicy(int policy)
Gets the dependency binding policy as a String.

Parameters:
policy - the policy.
Returns:
the String form of the policy.

getProvidedServiceState

public static String getProvidedServiceState(int state)
Gets the provided service state as a String.

Parameters:
state - the state.
Returns:
the String form of the state.


Copyright © 2011 Apache Software Foundation. All Rights Reserved.