Source code for /engineering/autohit-2003/src/autohit/common/channels/QueueReceipt.javaOriginal file QueueReceipt.java
   1 /**
   2  * AUTOHIT 2003
   3  * Copyright Erich P Gatejen (c) 1989,1997,2003,2004
   4  * 
   5  * This program is free software; you can redistribute it and/or modify 
   6  * it under the terms of the GNU General Public License as published by 
   7  * the Free Software Foundation; either version 2 of the License, or (at
   8  * your option) any later version.
   9  * This program is distributed in the hope that it will be useful, but
  10  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12  * more details.
  13  * 
  14  * You should have received a copy of the GNU General Public License along
  15  * with this program; if not, write to the Free Software Foundation, Inc.,
  16  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17  *
  18  * Additional license information can be found in the documentation.
  19  * @author Erich P Gatejen
  20  */
  21 package autohit.common.channels;
  22 
  23 /**
  24  * An receipt
  25  * @author Erich P. Gatejen
  26  * @version 1.0
  27  * <i>Version History</i>
  28  * <code>EPG - Initial - 25Apr03
  29  * EPG - Added setAsInteger and toString to enable future expansion - 2Jul03</code> 
  30  * 
  31  */
  32 public class QueueReceipt extends Receipt {
  33 
  34 	final static long serialVersionUID = 1;
  35 	
  36 	/**
  37 	 *  Default constructor.  DONT USE!  It will throw an exception!
  38 	 * @throws Exception
  39 	 */
  40 	public QueueReceipt() throws Exception {
  41 		throw new Exception("BAD PROGRAMMER!  DO NOT USE DEFAULT CONSTRUCTOR! Don't you ever read the javadoc?");
  42 	}
  43 
  44 	/**
  45 	 * Constructor.  Use this one!  This will create a non-guaranteeed
  46 	 * unique reciept.
  47 	 * @param id ID of the channel
  48 	 * @param name Name of the the drain
  49 	 * @param numbered Number of the enqueue.
  50 	 */
  51 	public QueueReceipt(String id, String name, int numbered){
  52 		this.info = id + '.' + name + '.' + numbered;
  53 	}
  54 
  55 	/**
  56 	 *  return the type;
  57 	 * @return a string representing the type, in this case it is "queue".
  58 	 */
  59 	public String getType() {
  60 		return "queue";
  61 	}
  62 
  63 	/**
  64 	 * Set as an integer.  This one doesn't do anything!
  65 	 * @param val a value to set as the receipt.
  66 	 */
  67 	public void setAsInteger(int val) {
  68 		// Don't do anything.
  69 	}
  70 	
  71 }