GrailsBuildEventListener (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.cli.support
[Java] Class GrailsBuildEventListener

    java.lang.Object
      org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener

All Implemented Interfaces:
  org.apache.tools.ant.BuildListener

    public class GrailsBuildEventListener
    extends java.lang.Object

Authors:
  Graeme Rocher

Since:
  1.1

Field Summary
`protected java.util.Map` | `globalEventHooks`

Constructor Summary
`GrailsBuildEventListener(groovy.lang.GroovyClassLoader scriptClassLoader, groovy.lang.Binding binding, BuildSettings buildSettings)`

Method Summary
`protected void` | `addGrailsBuildListener(java.lang.String listenerClassName)`
`protected void` | `addGrailsBuildListener(java.lang.Class listenerClass)`
`void` | `addGrailsBuildListener(GrailsBuildListener listener)`
`void` | `buildFinished(org.apache.tools.ant.BuildEvent buildEvent)`
`void` | `buildStarted(org.apache.tools.ant.BuildEvent buildEvent)`
`void` | `event(java.lang.String eventName, java.util.List arguments)` For backwards compatibility with _Events.groovy script
`void` | `event(java.lang.String eventName)` For backwards compatibility with _Events.groovy script
`protected java.io.File` | `findEventsScript(java.io.File dir)`
`groovy.lang.Binding` | `getBinding()`
`void` | `initialize()`
`protected void` | `loadEventHooks(BuildSettings buildSettings)`
`void` | `loadEventsScript(java.io.File eventScript)`
`protected void` | `loadGrailsBuildListeners()`
`void` | `messageLogged(org.apache.tools.ant.BuildEvent buildEvent)`
`void` | `setClassLoader(groovy.lang.GroovyClassLoader classLoader)`
`void` | `setGlobalEventHooks(java.util.Map globalEventHooks)`
`void` | `targetFinished(org.apache.tools.ant.BuildEvent buildEvent)`
`void` | `targetStarted(org.apache.tools.ant.BuildEvent buildEvent)`
`void` | `taskFinished(org.apache.tools.ant.BuildEvent buildEvent)`
`void` | `taskStarted(org.apache.tools.ant.BuildEvent buildEvent)`
`void` | `triggerEvent(java.lang.String eventName)` Triggers and event for the given name and binding
`void` | `triggerEvent(java.lang.String eventName, java.lang.Object... arguments)` Triggers an event for the given name and arguments

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### globalEventHooks

    @java.lang.SuppressWarnings("rawtypes")
    protected java.util.Map globalEventHooks

Constructor Detail

### GrailsBuildEventListener

    public GrailsBuildEventListener(groovy.lang.GroovyClassLoader scriptClassLoader, groovy.lang.Binding binding, BuildSettings buildSettings)

Method Detail

### addGrailsBuildListener

    protected void addGrailsBuildListener(java.lang.String listenerClassName)

### addGrailsBuildListener

    @java.lang.SuppressWarnings
    protected void addGrailsBuildListener(java.lang.Class listenerClass)

### addGrailsBuildListener

    public void addGrailsBuildListener(GrailsBuildListener listener)

### buildFinished

    public void buildFinished(org.apache.tools.ant.BuildEvent buildEvent)

### buildStarted

    public void buildStarted(org.apache.tools.ant.BuildEvent buildEvent)

### event

    @java.lang.DeprecatedtriggerEvent(eventName, arguments.toArray());
    public void event(java.lang.String eventName, @java.lang.SuppressWarnings java.util.List arguments)

  For backwards compatibility with _Events.groovy script
  deprecated:
    Use #triggerEvent instead
  Parameters:
    `eventName` - The event name
    `arguments` - The arguments

### event

    @java.lang.DeprecatedtriggerEvent(eventName);
    public void event(java.lang.String eventName)

  For backwards compatibility with _Events.groovy script
  deprecated:
    Use #triggerEvent instead
  Parameters:
    `eventName` - The event name

### findEventsScript

    protected java.io.File findEventsScript(java.io.File dir)

### getBinding

    public groovy.lang.Binding getBinding()

### initialize

    public void initialize()

### loadEventHooks

    protected void loadEventHooks(BuildSettings buildSettings)

### loadEventsScript

    public void loadEventsScript(java.io.File eventScript)

### loadGrailsBuildListeners

    protected void loadGrailsBuildListeners()

### messageLogged

    public void messageLogged(org.apache.tools.ant.BuildEvent buildEvent)

### setClassLoader

    public void setClassLoader(groovy.lang.GroovyClassLoader classLoader)

### setGlobalEventHooks

    public void setGlobalEventHooks(@java.lang.SuppressWarnings("rawtypes") java.util.Map globalEventHooks)

### targetFinished

    public void targetFinished(org.apache.tools.ant.BuildEvent buildEvent)

### targetStarted

    public void targetStarted(org.apache.tools.ant.BuildEvent buildEvent)

### taskFinished

    public void taskFinished(org.apache.tools.ant.BuildEvent buildEvent)

### taskStarted

    public void taskStarted(org.apache.tools.ant.BuildEvent buildEvent)

### triggerEvent

    public void triggerEvent(java.lang.String eventName)

  Triggers and event for the given name and binding
  Parameters:
    `eventName` - The name of the event

### triggerEvent

    @java.lang.SuppressWarningsList handlers = globalEventHooks.get(eventName);
    public void triggerEvent(java.lang.String eventName, java.lang.Object... arguments)

  Triggers an event for the given name and arguments
  Parameters:
    `eventName` - The name of the event
    `arguments` - The arguments

Groovy Documentation