public void registerIntent(Plugin plugin){
  Preconditions.checkState(!fired.get(),"Event %s has already been fired",this);
  Preconditions.checkState(!intents.contains(plugin),"Plugin %s already registered intent for event %s",plugin,this);
  intents.add(plugin);
  latch.incrementAndGet();
}

public void registerIntent ( Plugin plugin ) { Preconditions . checkState ( ! fired . get ( ) , "Event %s has already been fired" , this ) ; Preconditions . checkState ( ! intents . contains ( plugin ) , "Plugin %s already registered intent for event %s" , plugin , this ) ; intents . add ( plugin ) ; latch . incrementAndGet ( ) ; }
register an intent that this plugin will continue to perform work on a background task , and wishes to let the event proceed once the registered background task has completed .
