public class IvyEvent
extends java.lang.Object
The root of all ivy events Any ivy event knows which ivy instance triggered the event (the
source) and also has a name and a map of attributes. The name of the event represents the event
type, usually there is a one - one mapping between event names and IvyEvent subclass, even if
this is not mandatory. Example: pre-resolve pre-resolve-dependency post-download
The map of attributes is a Map from String keys to String values. It is especially useful to
filter events, and to get some of their essential data in some context where access to Java types
is not easy (in an Ant build file, for example), Example: pre-resolve (organisation=foo,
module=bar, revision=1.0, conf=default) post-download (organisation=foo, module=bar,
revision=1.0, artifact=foo-test, type=jar, ext=jar)
Modifier | Constructor and Description |
---|---|
protected |
IvyEvent(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAttribute(java.lang.String key,
java.lang.String value)
Should only be called during event object construction, since events should be immutable
|
protected void |
addAttributes(java.util.Map<java.lang.String,java.lang.String> attributes) |
protected void |
addConfsAttribute(java.lang.String[] confs) |
protected void |
addMDAttributes(ModuleDescriptor md) |
protected void |
addModuleIdAttributes(ModuleId moduleId) |
protected void |
addMridAttributes(ModuleRevisionId mrid) |
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Returns the attributes of this event, as a Map(String,String)
|
java.lang.String |
getName() |
EventManager |
getSource() |
int |
hashCode() |
java.lang.String |
toString() |
protected void addAttribute(java.lang.String key, java.lang.String value)
key
- dittovalue
- dittoprotected void addMDAttributes(ModuleDescriptor md)
protected void addMridAttributes(ModuleRevisionId mrid)
protected void addModuleIdAttributes(ModuleId moduleId)
protected void addConfsAttribute(java.lang.String[] confs)
protected void addAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
public EventManager getSource()
public java.lang.String getName()
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright ©2007-2020 The Apache Software Foundation, Licensed under Apache License, Version 2.0.