Source code for /engineering/autohit-1998/autohit/transport/TestTransport.javaOriginal file TestTransport.java
   1 /**
   2  * .
   3  * Copyright � 1999 Erich P G.
   4  *
   5  */
   6  
   7 package autohit.transport;
   8 
   9 /**
  10  *  A test transport.  Used to test the system
  11  *
  12  * @author Erich P. Gatejen
  13  * @version 1.0
  14  * <i>Version History</i>
  15  * <code>EPG - Initial - 25Jan99</code> 
  16  * 
  17  */
  18 public class TestTransport implements Transport {
  19 	
  20 	// --- FINAL FIELDS ------------------------------------------------------	
  21 
  22 	// --- FIELDS ------------------------------------------------------------
  23     
  24 
  25 	// --- PUBLIC METHODS ----------------------------------------------------
  26 	
  27     /**
  28      *  Default constructor.
  29      */
  30     public TestTransport() {
  31 
  32     }
  33      
  34     /**
  35      *  Connect    
  36      */     
  37     public void connect(String  address) throws TransportException {
  38         
  39         System.out.println("TEST TRANSPORT: Address=" + address);
  40     }
  41 
  42     /**
  43      *  Push a query and <b>wait</b> for a response.
  44      */   
  45     public Response push(Query  q) throws TransportException {
  46 
  47         System.out.println("TEST TRANSPORT: push qs=" + q.qs);
  48        
  49         Response r = new Response();
  50         r.headers  = null;
  51         r.code     = 200;
  52         r.content  = null;
  53         r.cLength  = 0;
  54 
  55         return r;
  56     }
  57 
  58     /**
  59      *  Set an environment variable for this transport.
  60      */ 
  61     public void environment(String  name, String  value) {
  62 
  63         System.out.println("TEST TRANSPORT: environment.  name=" + name + " value =" + value);
  64     }
  65 
  66     /**
  67      *  Disconnect transport.
  68      */
  69     public void disconnect() {
  70           
  71     }
  72  
  73  
  74 	// --- PRIVATE METHODS ---------------------------------------------------	
  75 }