1 /**
2 * .
3 * Copyright � 1999 Erich P G.
4 *
5 */
6
7 package autohit.transport;
8
9 /**
10 * An interface to a standard query/response transport facillity.
11 * <p>
12 * this may seem like an unneccessary layer of abstraction, but I have
13 * plans for the future...
14 *
15 * @author Erich P. Gatejen
16 * @version 1.0
17 * <i>Version History</i>
18 * <code>EPG - Initial - 18Jan99</code>
19 *
20 */
21 public interface Transport {
22
23 // --- FINAL FIELDS ------------------------------------------------------
24
25 // --- FIELDS ------------------------------------------------------------
26
27 // --- PUBLIC METHODS ----------------------------------------------------
28
29 /**
30 * Open the transport to the given address.
31 *
32 * @param address Address specification.
33 *
34 * @throws autohit.transport.TransportException
35 */
36 public void connect(String address) throws TransportException;
37
38 /**
39 * Push a query and wait for a response.
40 *
41 * @param q A queury specification.
42 * @return A response object.
43 * @throws autohit.transport.TransportException
44 * @see autohit.transport.Query
45 * @see autohit.transport.Response
46 */
47 public Response push(Query q) throws TransportException;
48
49 /**
50 * Set an environment variable for this transport.
51 *
52 * @param name variable name.
53 * @param value variable value.
54 */
55 public void environment(String name, String value);
56
57 /**
58 * Disconnet transport.
59 *
60 */
61 public void disconnect();
62
63 // --- PRIVATE METHODS ---------------------------------------------------
64 }
|