nl.toolforge.karma.core.cmd.event
Class CommandResponseEvent

java.lang.Object
  extended bynl.toolforge.karma.core.cmd.event.CommandResponseEvent
All Implemented Interfaces:
Event
Direct Known Subclasses:
CommandFinishedEvent, CommandStartedEvent, ErrorEvent, ExceptionEvent, MessageEvent

public abstract class CommandResponseEvent
extends java.lang.Object
implements Event

Event thrown when a CommandResponse changes. Classes interested in this event implement the CommandResponseListener interface.

Author:
W.H.Schraal, D.A. Smedes

Field Summary
 
Fields inherited from interface nl.toolforge.karma.core.cmd.event.Event
LEVEL_DEBUG, LEVEL_INFO, LEVEL_VERBOSE
 
Constructor Summary
CommandResponseEvent(Command command)
          Constructs a CommandResponseEvent and assumes the default priority to be Event.LEVEL_INFO.
CommandResponseEvent(Command command, int priority)
          Constructs a CommandResponseEvent.
 
Method Summary
 Command getCommand()
          Returns the command that generated this event.
abstract  Message getEventMessage()
          Implementations should return a specific Message instance.
 int getPriority()
          Gets the priority level for the event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandResponseEvent

public CommandResponseEvent(Command command)
Constructs a CommandResponseEvent and assumes the default priority to be Event.LEVEL_INFO.

Parameters:
command - The Command that generated

CommandResponseEvent

public CommandResponseEvent(Command command,
                            int priority)
Constructs a CommandResponseEvent.

Parameters:
command - The Command that generated
priority - The priority of the event.
Method Detail

getPriority

public final int getPriority()
Gets the priority level for the event.

Returns:
The priority level for the event.
See Also:
{@link #LEVEL_VERBOSE}, {@link #LEVEL_INFO}, {@link #LEVEL_DEBUG}

getEventMessage

public abstract Message getEventMessage()
Implementations should return a specific Message instance.

Returns:

getCommand

public Command getCommand()
Returns the command that generated this event.

Returns:
The Command command that generated this event.


Copyright © 2002-2004 Toolforge. All Rights Reserved.