Class BaseFeature<SessionStateType,​EndpointType extends FeatureEndpoint>

  • Type Parameters:
    SessionStateType - The session state interface that this feature requires
    EndpointType - The endpoint interface that this feature requires
    All Implemented Interfaces:
    Direct Known Subclasses:

    public abstract class BaseFeature<SessionStateType,​EndpointType extends FeatureEndpoint>
    extends java.lang.Object
    implements SentinelFeature
    Base class for POJO features.
    • Constructor Detail

      • BaseFeature

        protected BaseFeature​(EndpointType caller,
                              com.opencloud.sce.fsmtool.Facilities facilities,
                              SessionStateType sessionState)
    • Method Detail

      • dependenciesInjected

        public void dependenciesInjected()
        All requested elements have been injected, so the feature may carry out additional initialisation. This method should be overridden by features that need to carry out additional initialisation.
        Specified by:
        dependenciesInjected in interface SentinelFeature
      • startFeature

        public void startFeature​(java.lang.Object trigger,
                                 java.lang.Object activity,
                                 javax.slee.ActivityContextInterface aci,
                                 java.util.Map<java.lang.String,​ParameterValue> featureParameters)
        kick off the feature
        Specified by:
        startFeature in interface SentinelFeature
        trigger - a triggering context. The feature implementation must be able to cast this to a useful type for it to run
        activity - the slee activity object this feature is related to (may be null)
        aci - the activity context interface of the slee activity this feature is related to
        featureParameters - parameters supplied in the run feature statement that caused this feature to be executed
      • abortFeature

        public void abortFeature()
        The feature should abandon execution and clear up any resources. This method should be overridden by features that need to implement shutdown behaviour and clean up allocated resources.
        Specified by:
        abortFeature in interface SentinelFeature
      • getSessionState

        protected final SessionStateType getSessionState()
        the session state I have access to
      • getFacilities

        protected final com.opencloud.sce.fsmtool.Facilities getFacilities()
        the object I use for access to common SLEE facilities
      • getTracer

        protected final com.opencloud.rhino.facilities.ExtendedTracer getTracer()
        the tracer I use for writing trace messages
      • getCaller

        protected final EndpointType getCaller()
        the endpoint interface I use to interact with the sentinel core