org.apache.maven.mercury.event
Interface MercuryEvent

All Known Implementing Classes:
AbstractMercuryEvent, GenericEvent

public interface MercuryEvent

Version:
$Id: MercuryEvent.java 720564 2008-11-25 18:58:02Z ogusakov $
Author:
Oleg Gusakov

Nested Class Summary
static class MercuryEvent.EventMask
           
 
Method Summary
 long getDuration()
          duration of this event in millis
 java.lang.String getInfo()
          information for this event.
 java.lang.String getName()
          event name inside type
 java.util.Map<java.lang.String,java.lang.Object> getPayload()
          event's payload
 java.lang.Object getPayload(java.lang.String name)
          get one of payload values
 java.lang.String getResult()
          result field
 long getStart()
          get the event start time as UTC timestapm
 java.lang.String getTag()
          aggregation tag of this event.
 EventTypeEnum getType()
          event type
 boolean hasResult()
           
 void setInfo(java.lang.String info)
           
 void setPayload(java.util.Map<java.lang.String,java.lang.Object> payload)
          set the whole payload
 void setPayload(java.lang.String name, java.lang.Object value)
          set the whole payload
 void setResult(java.lang.String result)
           
 void setTag(java.lang.String tag)
           
 void start()
          start the event
 void stop()
          stop the event and calculate the duration
 

Method Detail

getType

EventTypeEnum getType()
event type

Returns:

getName

java.lang.String getName()
event name inside type

Returns:

getTag

java.lang.String getTag()
aggregation tag of this event. Used to trace event propagation in the system

Returns:

setTag

void setTag(java.lang.String tag)

getInfo

java.lang.String getInfo()
information for this event. Used to trace event propagation in the system

Returns:

setInfo

void setInfo(java.lang.String info)

getStart

long getStart()
get the event start time as UTC timestapm

Returns:
start time as UTC timestamp

start

void start()
start the event


stop

void stop()
stop the event and calculate the duration


getResult

java.lang.String getResult()
result field

Returns:

setResult

void setResult(java.lang.String result)

hasResult

boolean hasResult()

getDuration

long getDuration()
duration of this event in millis

Returns:
duration of this event

getPayload

java.util.Map<java.lang.String,java.lang.Object> getPayload()
event's payload

Returns:
results, associated with this event

getPayload

java.lang.Object getPayload(java.lang.String name)
get one of payload values

Parameters:
name - element name
Returns:
results, associated with this event

setPayload

void setPayload(java.util.Map<java.lang.String,java.lang.Object> payload)
set the whole payload

Parameters:
payload -

setPayload

void setPayload(java.lang.String name,
                java.lang.Object value)
set the whole payload

Parameters:
name -
value -


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.