You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2001/12/19 19:13:49 UTC

cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/event Command.java Message.java

bloritsch    01/12/19 10:13:49

  Added:       src/scratchpad/org/apache/avalon/excalibur/event
                        Command.java Message.java
  Log:
  add new QueueElement types
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/event/Command.java
  
  Index: Command.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.excalibur.event;
  
  import org.apache.avalon.framework.activity.Executable;
  
  /**
   * A Signal is a specific type of QueueElement that denotes a Control code for
   * the Queue system.
   *
   * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
   */
  public interface Command extends Signal, Executable
  {
      /**
       * Test whether this command is repeatable.  If so, it will be placed back
       * on the CommandQueue to be issued again when it is time.
       */
      boolean isRepeatable();
  
      /**
       * Gets the repeat interval so that the CommandQueue keeps it for the specified
       * amount of time before enqueuing it.  If the Command is not repeatable,
       * then the repeat interval is -1.
       */
      long getRepeatInterval();
  }
  
  
  1.1                  jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/event/Message.java
  
  Index: Message.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.excalibur.event;
  
  /**
   * A Source implements the side of an event queue where QueueElements are
   * dequeued operations only.
   *
   * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
   */
  public interface Message extends QueueElement
  {
      /**
       * Get the attachment associated with this Message.  If there is no
       * attachment, this method will return null.
       */
      Object getAttachment();
  
      /**
       * Attach an Object to the message.
       */
      void attach( Object attachment );
  
      /**
       * Clear the attachment.
       */
      void clear();
  }
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>