org.kuali.rice.krms.framework.engine.result
Class TimingResult

java.lang.Object
  extended by java.util.EventObject
      extended by org.kuali.rice.krms.framework.engine.result.TimingResult
All Implemented Interfaces:
Serializable, ResultEvent

public class TimingResult
extends EventObject
implements ResultEvent

An implementation of ResultEvent with start DateTime, end DateTime, and elapsed time in Milliseconds. The Date is formatted using org.joda.time.format.DateTimeFormat pattern of "yyyy-MM-dd HH.mm.ss.SSS"

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Fields inherited from interface org.kuali.rice.krms.api.engine.ResultEvent
ACTION_EXECUTED, PROPOSITION_EVALUATED, RULE_EVALUATED, TIMING_EVENT
 
Constructor Summary
TimingResult(String type, Object source, ExecutionEnvironment environment, org.joda.time.DateTime start, org.joda.time.DateTime end)
          Constructor
TimingResult(String description, String type, Object source, ExecutionEnvironment environment, org.joda.time.DateTime start, org.joda.time.DateTime end)
          Constructor
 
Method Summary
 String getDescription()
          Returns the description of the ResultEvent as a String
 Long getElapsedTimeInMilliseconds()
          Returns the Elapsed Time in Milliseconds
 ExecutionEnvironment getEnvironment()
          Returns the ExecutionEnvironment of the ResultEvent.
 Boolean getResult()
          Returns the Boolean result of the ResultEvent.
 Map<String,?> getResultDetails()
          Returns the result details of the ResultEvent as an unmodifiable Map
 org.joda.time.DateTime getTimestamp()
          Returns the org.joda.time.DateTime timestamp of the ResultEvent.
 String getType()
          Returns the type of the ResultEvent.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krms.api.engine.ResultEvent
getSource
 

Constructor Detail

TimingResult

public TimingResult(String description,
                    String type,
                    Object source,
                    ExecutionEnvironment environment,
                    org.joda.time.DateTime start,
                    org.joda.time.DateTime end)
Constructor

Parameters:
description - of the TimingResult
type - of the TimingResult
source - of the TimingResult
environment - ExecutionEnvironment of the TimingResult
start - org.joda.time.DateTime of the TimingResult
end - org.joda.time.DateTime of the TimingResult

TimingResult

public TimingResult(String type,
                    Object source,
                    ExecutionEnvironment environment,
                    org.joda.time.DateTime start,
                    org.joda.time.DateTime end)
Constructor

Parameters:
type - of the TimingResult
source - of the TimingResult
environment - ExecutionEnvironment of the TimingResult
start - org.joda.time.DateTime of the TimingResult
end - org.joda.time.DateTime of the TimingResult
Method Detail

getElapsedTimeInMilliseconds

public Long getElapsedTimeInMilliseconds()
Returns the Elapsed Time in Milliseconds

Returns:
Long end milliseconds minus start milliseconds

getEnvironment

public ExecutionEnvironment getEnvironment()
Description copied from interface: ResultEvent
Returns the ExecutionEnvironment of the ResultEvent.

Specified by:
getEnvironment in interface ResultEvent
Returns:
ExecutionEnvironment of the ResultEvent.

toString

public String toString()
Overrides:
toString in class EventObject

getResult

public Boolean getResult()
Description copied from interface: ResultEvent
Returns the Boolean result of the ResultEvent.

Specified by:
getResult in interface ResultEvent
Returns:
Boolean result of the ResultEvent.

getTimestamp

public org.joda.time.DateTime getTimestamp()
Description copied from interface: ResultEvent
Returns the org.joda.time.DateTime timestamp of the ResultEvent.

Specified by:
getTimestamp in interface ResultEvent
Returns:
org.joda.time.DateTime timestamp of the ResultEvent.

getType

public String getType()
Description copied from interface: ResultEvent
Returns the type of the ResultEvent.

Specified by:
getType in interface ResultEvent
Returns:
String of the type of ResultEvent.

getResultDetails

public Map<String,?> getResultDetails()
Returns the result details of the ResultEvent as an unmodifiable Map

Specified by:
getResultDetails in interface ResultEvent
Returns:
result details of the ResultEvent as an unmodifiable Map

getDescription

public String getDescription()
Description copied from interface: ResultEvent
Returns the description of the ResultEvent as a String

Specified by:
getDescription in interface ResultEvent
Returns:
description of the ResultEvent as a String


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.