public void beforeActivationFired(
     BeforeActivationFiredEvent event, WorkingMemory workingMemory) {
   listener.beforeActivationFired(
       new BeforeActivationFiredEventImpl(
           event.getActivation(),
           ((InternalWorkingMemory) workingMemory).getKnowledgeRuntime()));
 }
    public void activationCancelled(ActivationCancelledEvent event, WorkingMemory workingMemory) {

      listener.activationCancelled(
          new ActivationCancelledEventImpl(
              event.getActivation(),
              ((InternalWorkingMemory) workingMemory).getKnowledgeRuntime(),
              event.getCause()));
    }
 /**
  * Since this is a class adapter for API compatibility, the equals() and hashCode() methods
  * simply delegate the calls to the wrapped instance. That is implemented this way in order for
  * them to be able to match corresponding instances in internal hash-based maps and sets.
  */
 @Override
 public int hashCode() {
   return listener != null ? listener.hashCode() : 0;
 }
 public void agendaGroupPushed(AgendaGroupPushedEvent event, WorkingMemory workingMemory) {
   listener.agendaGroupPushed(
       new AgendaGroupPushedEventImpl(
           event.getAgendaGroup(),
           ((InternalWorkingMemory) workingMemory).getKnowledgeRuntime()));
 }