public final void startEvent( String eventName, String target, long timestamp ) { if( boundStartEvents.contains( eventName ) ) { doStartEvent( eventName, target, timestamp ); } }
public final void endEvent( String eventName, String target, long timestamp ) { if( boundEndEvents.contains( eventName ) ) { doEndEvent( eventName, target, timestamp ); } }
public final void errorEvent( String eventName, String target, long timestamp, Throwable cause ) { if( boundErrorEvents.contains( eventName ) ) { doErrorEvent( eventName, target, timestamp, cause ); } }
EventDispatcher eventDispatcher = new DefaultEventDispatcher(); eventDispatcher.addEventMonitor( eventMonitor );
public void execute(MavenSession session, ReactorManager rm, EventDispatcher dispatcher) throws BuildFailureException, LifecycleExecutionException { try { session.getEventDispatcher().addEventMonitor(new EventMonitorImpl()); if(listener!=null) listener.preBuild(session,rm,dispatcher); try { super.execute(session, rm, dispatcher); } finally { if(listener!=null) listener.postBuild(session,rm,dispatcher); } } catch (InterruptedException e) { throw new BuildFailureException("aborted",e); } catch (IOException e) { throw new BuildFailureException(e.getMessage(),e); } catch (AbortException e) { throw new BuildFailureException("aborted",e); } }
public void dispatchError( String event, String target, Throwable cause ) { for ( Iterator it = eventMonitors.iterator(); it.hasNext(); ) { EventMonitor monitor = (EventMonitor) it.next(); monitor.errorEvent( event, target, System.currentTimeMillis(), cause ); } }
public void dispatchEnd( String event, String target ) { for ( Iterator it = eventMonitors.iterator(); it.hasNext(); ) { EventMonitor monitor = (EventMonitor) it.next(); monitor.endEvent( event, target, System.currentTimeMillis() ); } }
public void dispatchStart( String event, String target ) { for ( Iterator it = eventMonitors.iterator(); it.hasNext(); ) { EventMonitor monitor = (EventMonitor) it.next(); monitor.startEvent( event, target, System.currentTimeMillis() ); } }
public void execute(MavenSession session, ReactorManager rm, EventDispatcher dispatcher) throws BuildFailureException, LifecycleExecutionException { try { session.getEventDispatcher().addEventMonitor(new EventMonitorImpl()); if(listener!=null) listener.preBuild(session,rm,dispatcher); try { super.execute(session, rm, dispatcher); } finally { if(listener!=null) listener.postBuild(session,rm,dispatcher); } } catch (InterruptedException e) { throw new BuildFailureException("aborted",e); } catch (IOException e) { throw new BuildFailureException(e.getMessage(),e); } catch (AbortException e) { throw new BuildFailureException("aborted",e); } }