Class AdaptationFactory

java.lang.Object
de.uni_trier.wi2.procake.adaptation.AdaptationFactory
All Implemented Interfaces:
Factory

public class AdaptationFactory extends Object implements Factory
This factory creates several adaptation instances.
  • Method Details

    • bind

      public static boolean bind(AdaptationFactoryObject implementation)
      stores a new implementation to the factory
      Parameters:
      implementation - Adaptation Factory
      Returns:
      Always 'true'
    • getAvailableAdaptationAlgorithms

      public static String[] getAvailableAdaptationAlgorithms()

      getAvailableAdaptationAlgorithms.

      Returns:
      Returns a list of the names of all available adaptation algorithms.
    • getAdaptationAlgorithmClass

      public static Class<?> getAdaptationAlgorithmClass(String algorithmName)

      getAdaptationAlgorithmClass.

      Parameters:
      algorithmName - Name of the adaptation algorithm
      Returns:
      class of the adaptation algorithm with the given name
    • newAdaptationAlgorithm

      public static AdaptationFactoryObject newAdaptationAlgorithm(String algorithmName)
      Creates a new adaptation algorithm of the specified name.
      Parameters:
      algorithmName - The name of the adaptation algorithm.
      Returns:
      Returns a new adaptation algorithm for the specifed name
    • unbind

      public static boolean unbind(AdaptationFactoryObject implementation)
      Removes an implementation from the factory.
      Parameters:
      implementation - Adaptation factory implementation
      Returns:
      The previously bound implementation factory or nothing
    • reset

      public void reset()
      This method has to be implemented by every factory in order to allow a proper restart of ProCAKE. For example, this method might reset the default factory object or other stateful variables.
      Specified by:
      reset in interface Factory
    • bind

      public boolean bind(Object implementation)
      Bind an implementation to the factory.
      Specified by:
      bind in interface Factory
      Parameters:
      implementation - The object to bind.
      Returns:
      true if the factory accept the implementation, otherwise false .
    • unbind

      public boolean unbind(Object implementation)
      Unbinds an implementation from the factory.
      Specified by:
      unbind in interface Factory
      Parameters:
      implementation - The object to unbind.
      Returns:
      true if the factory accept the implementation, otherwise false .