Class CommandQueueEvent

  • All Implemented Interfaces:
    Serializable

    public class CommandQueueEvent
    extends EventObject

    An event class for notifying listeners about the state of a CommandQueue.

    Event objects of this class are sent to registered listeners if certain changes in the command queue's life cycle occur. Registered listeners can react on these changes, i.g. by displaying some signs if currently commands are executed.

    Version:
    $Id: CommandQueueEvent.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    See Also:
    Serialized Form
    • Constructor Detail

      • CommandQueueEvent

        public CommandQueueEvent​(CommandQueue q,
                                 Command c,
                                 CommandQueueEvent.Type t)
        Creates a new instance of CommandQueueEvent and fully initializes it.
        Parameters:
        q - the affected command queue
        c - the affected command object
        t - the event's type
    • Method Detail

      • getCommand

        public Command getCommand()
        Returns the Command object affected by this event. This may be null if this event is not related to a Command object.
        Returns:
        the affected command
      • getCommandQueue

        public CommandQueue getCommandQueue()
        Returns the CommandQueue that caused this event.
        Returns:
        the command queue
      • getType

        public CommandQueueEvent.Type getType()
        Returns the type of this event. This is one of the QE_XXXX constants.
        Returns:
        the type of this event