code: public final boolean resume(InternalEvent event) throws ActivityException {
          if (isOtherEvent(event)) {
               String messageString = this.getMessageFromEventMessage(event);
              this.setReturnCode(event.getCompletionCode());
              processOtherMessage(messageString);
              handleEventCompletionCode();
               return true;
          } else {    // timer expires
              int moreToWaitInSeconds = processTimerExpiration();
              if (moreToWaitInSeconds<=0) super.deregisterEvents();
              else sendDelayedResumeMessage(moreToWaitInSeconds);
              return moreToWaitInSeconds<=0;
          }
      }
docs: The resume method for this class is handling internal functions related to
  events processing in addition to timer expiration, so it is not supposed to be overriden. The method
  is therefore declared as final. To customize handling of events, please override
  the method {@link #processOtherMessage(String)}, and to customize
  the activity so that it can reset timer and wait again, please override
  the method {@link #processTimerExpiration()}.