Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.14 KB

events.md

File metadata and controls

33 lines (26 loc) · 1.14 KB

Events

Some action is able to produce synchronous events.

The events must inherit from "org.kendar.events.Event"

To register for a certain event it'enough to add a dependency on the EventQueue interface and register the event handler:

@Component
public class PactEvents {
    public PactEvents(EventQueue eventQueue){
        eventQueue.register((e)->handleViolation(e),PactViolation.class);
    }
    
    private void handleViolation(PactViolation event){
        //Do something
    }

Standard Events

  • ConfigChangedEvent when a config change is detected
    • Fields
      • name: The class name of the config that had been changed
  • NullCompleted when a Null test is completed
  • PactCompleted when a Pact test is completed
  • SSLChangedEvent when the SSL hosts are changed. Forces a restart
  • ProxyConfigChanged when the rewrites are changed. Forces their test
  • ScriptsModified force the reloading of all Javascaript scripts
  • ExecuteLocalRequest require the execution of a -local only- request (will not go on the internet)
  • ExecuteRemoteRequest require the execution of a remote request