Class ActivityRegistryImpl

  • All Implemented Interfaces:
    com.anaptecs.jeaf.core.servicechannel.api.ActivityRegistry

    public class ActivityRegistryImpl
    extends java.lang.Object
    implements com.anaptecs.jeaf.core.servicechannel.api.ActivityRegistry
    Class implements an activity registry for JEAF.
    Version:
    JEAF Release 1.3
    Author:
    JEAF Development Team
    • Constructor Summary

      Constructors 
      Constructor Description
      ActivityRegistryImpl()
      Ensure that there is only one instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.anaptecs.jeaf.core.api.Activity getActivity​(java.lang.Class<? extends com.anaptecs.jeaf.core.api.Activity> pActivityClass)
      Method returns the activity of the passed type.
      java.util.Collection<com.anaptecs.jeaf.core.api.Activity> getAllActivities()
      Method returns all activities of the registry.
      void registerActivity​(java.lang.Class<? extends com.anaptecs.jeaf.core.api.Activity> pActivityClass, com.anaptecs.jeaf.core.api.Activity pActivityImpl)
      Method adds the passed activity to the registry.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActivityRegistryImpl

        public ActivityRegistryImpl()
        Ensure that there is only one instance.
    • Method Detail

      • getActivity

        public com.anaptecs.jeaf.core.api.Activity getActivity​(java.lang.Class<? extends com.anaptecs.jeaf.core.api.Activity> pActivityClass)
                                                        throws com.anaptecs.jeaf.xfun.api.errorhandling.JEAFSystemException
        Method returns the activity of the passed type.
        Specified by:
        getActivity in interface com.anaptecs.jeaf.core.servicechannel.api.ActivityRegistry
        Parameters:
        pActivityClass - Class object representing the requested activity. The parameter must not be null.
        Returns:
        Activity Requested activity. The method returns never null.
        Throws:
        com.anaptecs.jeaf.xfun.api.errorhandling.JEAFSystemException - in case that no activity of the requested type could be found.
      • registerActivity

        public void registerActivity​(java.lang.Class<? extends com.anaptecs.jeaf.core.api.Activity> pActivityClass,
                                     com.anaptecs.jeaf.core.api.Activity pActivityImpl)
                              throws com.anaptecs.jeaf.xfun.api.errorhandling.JEAFSystemException
        Method adds the passed activity to the registry. Exiting implementations of an activity must not be overridden.
        Specified by:
        registerActivity in interface com.anaptecs.jeaf.core.servicechannel.api.ActivityRegistry
        Parameters:
        pActivityClass - Interface of the activity that should be added. The parameter must not be null.
        pActivityImpl - Activity implementation that should be added. The parameter must not be null.
        Throws:
        com.anaptecs.jeaf.xfun.api.errorhandling.JEAFSystemException - in case that someone tries to override an existing activity implementation.
      • getAllActivities

        public java.util.Collection<com.anaptecs.jeaf.core.api.Activity> getAllActivities()
        Method returns all activities of the registry.
        Specified by:
        getAllActivities in interface com.anaptecs.jeaf.core.servicechannel.api.ActivityRegistry
        Returns:
        List List with all activities. The method never returns null.