edu.isi.pegasus.common.logging
Interface Event

All Superinterfaces:
Cloneable
All Known Implementing Classes:
NetloggerEvent, SimpleEvent

public interface Event
extends Cloneable

Author:
vahi

Method Summary
 Event add(String key, String value)
          Add to the log message.
 String createEntityHierarchyMessage(String parentType, String parentID, String childIdType, Collection<String> childIDs)
          Creates a log message that connects the parent entities with the children.
 String createLogMessage()
          Creates a log message with the contents of the internal log buffer.
 String createLogMessageAndReset()
          Creates a log message with the contents of the internal log buffer.
 String getEndEventMessage()
          Creates the end message for the event.
 String getEventName()
          Returns the name of event that is currently associated with the log messages.
 String getProgramName(String name)
          Returns the program name for the software whose log statement are logged.
 String getStartEventMessage()
          Creates the start message for the event.
 void reset()
          Reset the internal log message buffer associated with the event
 void setEvent(String name, Map<String,String> map)
          Adds the event that is to be associated with the log messages onto an internal stack
 void setEvent(String name, String entityName, String entityID)
          Set the event that is to be associated with the log messages.
 void setProgramName(String name)
          Sets the program name for the software whose log statement are logged.
 

Method Detail

setProgramName

void setProgramName(String name)
Sets the program name for the software whose log statement are logged.

Parameters:
name -

getProgramName

String getProgramName(String name)
Returns the program name for the software whose log statement are logged.

Parameters:
name -
Returns:
the name of the program

setEvent

void setEvent(String name,
              String entityName,
              String entityID)
Set the event that is to be associated with the log messages.

Parameters:
name - the name of the event to be associated
entityName - the primary entity that is associated with the event e.g. workflow
entityID - the id of that entity.

setEvent

void setEvent(String name,
              Map<String,String> map)
Adds the event that is to be associated with the log messages onto an internal stack

Parameters:
name - the name of the event to be associated
map - Map of Entity Names with the entity identifiers.

getEventName

String getEventName()
Returns the name of event that is currently associated with the log messages.

Returns:
the event to be associated

getStartEventMessage

String getStartEventMessage()
Creates the start message for the event.

Returns:
start event message

getEndEventMessage

String getEndEventMessage()
Creates the end message for the event.

Returns:
end event message

reset

void reset()
Reset the internal log message buffer associated with the event


add

Event add(String key,
          String value)
Add to the log message.

Parameters:
key -
value -
Returns:
Self-reference, so calls can be chained

createLogMessage

String createLogMessage()
Creates a log message with the contents of the internal log buffer.

Returns:
log message.

createLogMessageAndReset

String createLogMessageAndReset()
Creates a log message with the contents of the internal log buffer. It then resets the buffer before returning the log message

Returns:
the log message

createEntityHierarchyMessage

String createEntityHierarchyMessage(String parentType,
                                    String parentID,
                                    String childIdType,
                                    Collection<String> childIDs)
Creates a log message that connects the parent entities with the children. For e.g. can we use to create the log messages connecting the jobs with the workflow they are part of.

Parameters:
parentType - the type of parent entity
parentID - the id of the parent entity
childIdType - the type of children entities
childIDs - Collection of children id's
Returns:
the entity hierarchy message.


Copyright © 2011 The University of Southern California. All Rights Reserved.