Class ActivityStateNotificationWrapper

    • Method Detail

      • init

        public void init​(URI[] uris)
        Sets the URIs with which this ActivityStateNotification has been registered.
        Parameters:
        uris - The URIs with which this ActivityStateNotification has been registered This must not be null nor empty.
      • getUris

        public URI[] getUris()
        Gets the URIs with which this ActivityStateNotification has been registered or null.
        Returns:
        The URIs with which this ActivityStateNotification has been registered.
      • getId

        public UUID getId()
        Gets the ID of the wrapped ActivityStateCallback-instance.
        Returns:
        The ID of the wrapped ActivityStateCallback-instance.
      • setCallbackAfterResume

        public URI[] setCallbackAfterResume​(UUID id)
        Sets the ID of the callback used after resuming. This is required to determine whether it is the same or a different notification. This is also part of the notification interface.
        Parameters:
        id - The ID of the notification callback used after the current resume.
        Returns:
        The URIs with which this ActivityStateNotification has been registered in case it is the wrapper for the designated callback ID or null.
      • activitySuspended

        public void activitySuspended​(EBPInstanceReference activity,
                                      String sessionId)
        Description copied from interface: ActivityStateNotification
        Notifies that the designated activity in the designated execution session has been suspended normally. There may be an resume and further notifications afterwards.
        Specified by:
        activitySuspended in interface ActivityStateNotification
        Parameters:
        activity - The activity that has been suspended normally.
        sessionId - The ID of the execution session of the suspended activity.
      • activitySuspended

        public void activitySuspended​(EBPInstanceReference activity,
                                      String sessionId,
                                      long timeout)
        Description copied from interface: ActivityStateNotification
        Notifies that the designated activity in the designated execution session has been suspended and needs to be resumed after the designated timeout. Usually this will be started by a ResumingRuntimeManager and thus there will be a resume and further notifications afterwards.
        Specified by:
        activitySuspended in interface ActivityStateNotification
        Parameters:
        activity - The activity that has been suspended normally.
        sessionId - The ID of the execution session of the suspended activity.
        timeout - The time period (in milliseconds) when the suspended application wants to be resumed automatically.
      • activitySignalled

        public void activitySignalled​(EBPInstanceReference activity,
                                      String sessionId,
                                      int signal)
        Description copied from interface: ActivityStateNotification
        Notifies that the designated activity in the designated execution session has terminated with the designated signal.
        Specified by:
        activitySignalled in interface ActivityStateNotification
        Parameters:
        activity - The activity that has been terminated.
        sessionId - The ID of the execution session of the signalled activity.
        signal - The signal that led to the termination of the activity.
      • activityFailed

        public void activityFailed​(EBPInstanceReference activity,
                                   String sessionId,
                                   String errorMessage,
                                   String state,
                                   long errorCode)
        Description copied from interface: ActivityStateNotification
        Notifies that the designated activity in the designated execution session has failed with the designated additional failure information.
        Specified by:
        activityFailed in interface ActivityStateNotification
        Parameters:
        activity - The activity that has failed.
        sessionId - The ID of the execution session of the failed activity.
        errorMessage - The error message to be interpreted by a user or by a failure handling routine.
        state - Arbitrary state information specific to the instance, comparable to the vendor code in SQLException.
        errorCode - The error code specifying the type of error.
      • cleanup

        protected void cleanup()
        Removes this wrapper from the map of listeners and from the global activity state listener for a specific activity.