KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mckoi > database > jdbc > ProtocolConstants


1 /**
2  * com.mckoi.database.jdbc.ProtocolConstants 20 Jul 2000
3  *
4  * Mckoi SQL Database ( http://www.mckoi.com/database )
5  * Copyright (C) 2000, 2001, 2002 Diehl and Associates, Inc.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * Version 2 as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License Version 2 for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * Version 2 along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  *
20  * Change Log:
21  *
22  *
23  */

24
25 package com.mckoi.database.jdbc;
26
27 /**
28  * Constants used in the JDBC database communication protocol.
29  *
30  * @author Tobias Downer
31  */

32
33 public interface ProtocolConstants {
34
35   /**
36    * Sent as an acknowledgement to a command.
37    */

38   public int ACKNOWLEDGEMENT = 5;
39
40   /**
41    * Sent if login passed.
42    */

43   public int USER_AUTHENTICATION_PASSED = 10;
44
45   /**
46    * Sent if login failed because username or password were invalid.
47    */

48   public int USER_AUTHENTICATION_FAILED = 15;
49
50   /**
51    * Operation was successful.
52    */

53   public int SUCCESS = 20;
54
55   /**
56    * Operation failed (followed by a UTF String error message).
57    */

58   public int FAILED = 25;
59
60
61   /**
62    * Operation threw an exception.
63    */

64   public int EXCEPTION = 30;
65
66   /**
67    * There was an authentication error. A query couldn't be executed because
68    * the user does not have enough rights.
69    */

70   public int AUTHENTICATION_ERROR = 35;
71
72
73
74
75
76   // ---------- Commands ----------
77

78   /**
79    * Query sent to the server for processing.
80    */

81   public int QUERY = 50;
82
83   /**
84    * Disposes the server-side resources associated with a result.
85    */

86   public int DISPOSE_RESULT = 55;
87
88   /**
89    * Requests a section of a result from the server.
90    */

91   public int RESULT_SECTION = 60;
92
93   /**
94    * Requests a section of a streamable object from the server.
95    */

96   public int STREAMABLE_OBJECT_SECTION = 61;
97
98   /**
99    * Disposes of the resources associated with a streamable object on the
100    * server.
101    */

102   public int DISPOSE_STREAMABLE_OBJECT = 62;
103
104   /**
105    * For pushing a part of a streamable object onto the server from the client.
106    */

107   public int PUSH_STREAMABLE_OBJECT_PART = 63;
108   
109
110   
111   
112   /**
113    * Ping command.
114    */

115   public int PING = 65;
116
117   /**
118    * Closes the protocol stream.
119    */

120   public int CLOSE = 70;
121
122   /**
123    * Denotes an event from the database (trigger, etc).
124    */

125   public int DATABASE_EVENT = 75;
126
127   /**
128    * Denotes a server side request for information. For example, a request for
129    * a part of a streamable object.
130    */

131   public int SERVER_REQUEST = 80;
132   
133
134 }
135
Popular Tags