Class ResourceAssignmentActivator

java.lang.Object
cz.metacentrum.perun.core.impl.ResourceAssignmentActivator
All Implemented Interfaces:
EventListener, ApplicationListener<ContextRefreshedEvent>

public class ResourceAssignmentActivator extends Object implements ApplicationListener<ContextRefreshedEvent>
Component responsible for activating group-resource assignments in PROCESSING or FAILED state after Perun startup.
Author:
Radoslav Čerhák
  • Constructor Details

    • ResourceAssignmentActivator

      public ResourceAssignmentActivator(PerunBl perunBl)
  • Method Details

    • getPerunBl

      public PerunBl getPerunBl()
    • setPerunBl

      public void setPerunBl(PerunBl perunBl)
    • onApplicationEvent

      @Async public void onApplicationEvent(@NonNull ContextRefreshedEvent contextRefreshedEvent)
      Tries to activate all group-resource assignments in PROCESSING or FAILED state after Spring context is refreshed or initialized, e.g. after Perun startup. This method runs asynchronously so it doesn't block other Spring events.
      Specified by:
      onApplicationEvent in interface ApplicationListener<ContextRefreshedEvent>