Source code for /engineering/autohit-2003/src/autohit/common/channels/Injector.javaOriginal file Injector.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   *
  25  * @author Erich P. Gatejen
  26  * @version 1.0
  27  * <i>Version History</i>
  28  * <code>EPG - Rewrite - 27Apr03</code> 
  29  * 
  30  */
  31 public interface Injector {
  32 
  33 	/**
  34 	 * Post an item
  35 	 * @return a receipt
  36 	 */
  37 	public Receipt post(Atom	a) throws ChannelException;
  38 	
  39 	/**
  40 	 * Post a a default item.  Use this if you aren't sure what
  41 	 * kind of Atom this channal normally services.
  42 	 * @param numeric value
  43 	 * @param o object to post (often a string)
  44 	 * @return a receipt
  45 	 * @throws ChannelException
  46 	 */
  47 	public Receipt defaultPost(int numeric, Object o) throws ChannelException;
  48 
  49 	/**
  50 	 * Instantiate a default atom for this kind of injector.  It will be completely
  51 	 * bare.
  52 	 * @return default atom
  53 	 */
  54 	public Atom defaultAtom();
  55 	
  56 	/**
  57 	 * Set channel callback
  58 	 * @return a receipt
  59 	 */
  60 	public void setChannel(Channel c) throws ChannelException;
  61 		
  62 }