KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > impl > drda > CodePoint


1 /*
2
3    Derby - Class org.apache.derby.impl.drda.CodePoint
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to You under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21 package org.apache.derby.impl.drda;
22
23 // TBD:
24
// organize into separate kinds of code points; impose organizational scheme.
25
// TBD:
26
// reconsider the various SECCHKCD_xx constants, perhaps we should hardwire.
27

28 class CodePoint
29 {
30     // --------------------code points for constant ddm data----------------------
31

32     // Indicates false state. This 1-byte code point is used by some DDM parameters.
33
static final byte FALSE = -16; // was 0xf0
34

35     // Indicates true state. This 1-byte code point is used by some DDM parameters.
36
static final byte TRUE = -15; // was 0xf1
37

38     // Zero indicator constant.
39
// Indicates data does flow.
40
static final int ZEROIND = 0x00;
41
42     static final int NULLDATA = 0xFF;
43
44     // Security check was successful.
45
static final int SECCHKCD_00 = 0x00;
46
47     // SECMEC value not supported.
48
static final int SECCHKCD_01 = 0x01;
49
50     // DCE informational status
51
static final int SECCHKCD_02 = 0x02;
52
53     // DCE retryable error.
54
static final int SECCHKCD_03 = 0x03;
55
56     // DCE non-retryable error.
57
static final int SECCHKCD_04 = 0x04;
58
59     // GSSAPI informaional status.
60
static final int SECCHKCD_05 = 0x05;
61
62     // GSSAPI retryable error.
63
static final int SECCHKCD_06 = 0x06;
64
65     // GSSAPI non-retryable error.
66
static final int SECCHKCD_07 = 0x07;
67
68     // Local security service info.
69
static final int SECCHKCD_08 = 0x08;
70
71     // Local security service retryable error.
72
static final int SECCHKCD_09 = 0x09;
73
74     // Local security service non-retryable error.
75
static final int SECCHKCD_0A = 0x0A;
76
77     // SECTKN missing or invalid.
78
static final int SECCHKCD_0B = 0x0B;
79
80     // Password expired.
81
static final int SECCHKCD_0E = 0x0E;
82
83     // Password invalid.
84
static final int SECCHKCD_0F = 0x0F;
85
86     // Password missing.
87
static final int SECCHKCD_10 = 0x10;
88
89     // Userid missing.
90
static final int SECCHKCD_12 = 0x12;
91
92     // Userid invalid.
93
static final int SECCHKCD_13 = 0x13;
94
95     // Userid revoked.
96
static final int SECCHKCD_14 = 0x14;
97
98     // New password invalid.
99
static final int SECCHKCD_15 = 0x15;
100
101     // ----------------------ddm code points--------------------------------------
102

103     final static int EXCSAT = 0x1041;
104     final static int SYNCCTL = 0x1055;
105     final static int SYNCRSY = 0x1069;
106     final static int ACCSEC = 0x106D;
107     final static int SECCHK = 0x106E;
108     final static int SYNCLOG = 0x106F;
109     final static int ACCRDB = 0x2001;
110     final static int BGNBND = 0x2002;
111     final static int BNDSQLSTT = 0x2004;
112     final static int CLSQRY = 0x2005;
113     final static int CNTQRY = 0x2006;
114     final static int DRPPKG = 0x2007;
115     final static int DSCSQLSTT = 0x2008;
116     final static int ENDBND = 0x2009;
117     final static int EXCSQLIMM = 0x200A;
118     final static int EXCSQLSTT = 0x200B;
119     final static int EXCSQLSET = 0x2014;
120     final static int OPNQRY = 0x200C;
121     final static int PRPSQLSTT = 0x200D;
122     final static int RDBCMM = 0x200E;
123     final static int RDBRLLBCK = 0x200F;
124     final static int REBIND = 0x2010;
125     final static int DSCRDBTBL = 0x2012;
126
127     final static int SQLDTA = 0x2412;
128     final static int SQLDTARD = 0x2413;
129     final static int SQLSTT = 0x2414;
130     final static int SQLATTR = 0x2450;
131     final static int SQLSTTVRB = 0x2419;
132     final static int QRYDSC = 0x241A;
133     final static int QRYDTA = 0x241B;
134     final static int SQLRSLRD = 0x240E;
135     final static int SQLCINRD = 0x240B;
136
137     // Access Security Reply Data.
138
// Contains the security information from a target server's
139
// security manager. This information is returned in response
140
// to an ACCSEC command.
141
static final int ACCSECRD = 0x14AC;
142
143     // Agent codepoint constant.
144
static final int AGENT = 0x1403;
145
146     // The codepoint for codepoint
147
static final int CODPNT = 0x000C;
148
149     // The Codepoint for data representation of dictionary codepoint
150
static final int CODPNTDR = 0x0064;
151
152     // Subtypes for CODPNTR
153
static final int CSTMBCS = 0x2435; // Multibyte default
154

155     // CCSID for Double-Byte Characters codepoint constant.
156
static final int CCSIDDBC = 0x119D;
157
158     // CCSID for Mixed-Byte Characters codepoint constant.
159
static final int CCSIDMBC = 0x119E;
160
161     // CCSID Manager. Min. level 4.
162
// Provides character data conversion of the DDM parameters
163
// containing character data.
164
static final int CCSIDMGR = 0x14CC;
165
166     // CCSID for Single-Byte Characters codepoint constant.
167
static final int CCSIDSBC = 0x119C;
168
169     // LU 6.2 Conversational Communications Manager.
170
// Describes the communications manager that supports
171
// conversational protocols by using System Network
172
// Architecture Logical Unit 6.2 (SNA LU 6.2) local
173
// communications facilities.
174
static final int CMNAPPC = 0x1444;
175
176     // SNA LU 6.2 Sync Point Conversational Communications
177
// Manager. Min. level 4.
178
// Provides an SNA LU 6.2 Conversational Communications
179
// Manager with sync point support.
180
static final int CMNSYNCPT = 0x147C;
181
182     // TCP/IP Communication Manager codepoint constant. Min. level 5.
183
static final int CMNTCPIP = 0x1474;
184
185     // XA Manager codepoint constant
186
static final int XAMGR = 0x1C01;
187
188     // Correlation Token codepoint constant.
189
static final int CRRTKN = 0x2135;
190
191     // Target Default Value Return
192
static final int TRGDFTRT = 0x213B;
193
194     // It is a manager of a set of named descriptions of object.
195
static final int DICTIONARY = 0x1458;
196
197     // Manager dependency error code
198
static final int DEPERRCD = 0x119B;
199
200     // Description Error code
201
static final int DSCERRCD = 0x2101;
202
203     // Server Attributes Reply Data codepoint constant.
204
static final int EXCSATRD = 0x1443;
205
206     // External Name codepoint constant.
207
static final int EXTNAM = 0x115E;
208
209     // Fixed Row Query Protocol.
210
static final int FIXROWPRC = 0x2418;
211
212     // Force Fixed Row Query Protocol.
213
static final int FRCFIXROW = 0x2410;
214
215     // Limited Block Query Protocol.
216
static final int LMTBLKPRC = 0x2417;
217
218     // Manager Level List codepoint constant.
219
static final int MGRLVLLS = 0x1404;
220
221     // Manager Level Number Attribute constants.
222
// Specifies the level of a defined DDM manager.
223
static final int MGRLVLN = 0x1473;
224
225     // Monitor Events
226
static final int MONITOR = 0x1900;
227
228     // Monitor Reply Data
229
static final int MONITORRD = 0x1C00;
230
231     // New Password
232
static final int NEWPASSWORD = 0x11DE;
233
234     // Password
235
static final int PASSWORD = 0x11A1;
236
237     // Package Default Character Subtype codepoint constant.
238
static final int PKGDFTCST = 0x2125;
239
240     // Package Id
241
static final int PKGID = 0x2109;
242
243     // Maximum Number of extra Blocks
244
static final int MAXBLKEXT = 0x2141;
245
246     // Maximum result set count
247
static final int MAXRSLCNT = 0x2140;
248
249     // Result Set Flags
250
static final int RSLSETFLG = 0x2142;
251
252     // RDB Commit allowed
253
static final int RDBCMTOK = 0x2105;
254
255     // Package name & consistency token
256
static final int PKGNAMCT = 0x2112;
257
258     // list of PAKNAMCSN
259
static final int PKGSNLST = 0x2139;
260
261     // Conversational Protocol Error Code
262
static final int PRCCNVCD = 0x113F;
263
264     // Product Specific Identifier codepoint constant.
265
static final int PRDID = 0x112E;
266
267     // Output override
268
static final int OUTOVR = 0x2415;
269
270     //Output override option
271
static final int OUTOVROPT = 0x2147;
272
273     // Package Consistency Token
274
static final int PKGCNSTKN = 0x210D;
275
276     // Product Specific Data
277
static final int PRDDTA = 0x2104;
278
279     // Query Instance Identifier
280
static final int QRYINSID = 0x215B;
281
282     // Query Block Protocol Control
283
static final int QRYBLKCTL = 0x2132;
284
285     // Query Block Size
286
static final int QRYBLKSZ = 0x2114;
287
288     // Query Protocol Type
289
static final int QRYPRCTYP = 0x2102;
290
291     // Query Close Implicit
292
static final int QRYCLSIMP = 0x215D;
293
294     // Query Close Lock Release
295
static final int QRYCLSRLS = 0x215E;
296
297     // QRYOPTVAL - Query Optimization Value
298
static final int QRYOPTVAL = 0x215F;
299
300     // Cursor Allows Read and Delete Operations.
301
static final int QRYDEL = 0x2;
302
303     // Cursor is Read-only.
304
static final int QRYRDO = 0x1;
305
306     // Insensitive SCROLL
307
static final int QRYINS = 0x1;
308
309     // Sensitive static
310
static final int QRYSNSSTC = 0x2;
311
312     // Number of fetch or Insert Rows
313
static final int NBRROW = 0x213A;
314
315     // Output expected
316
static final int OUTEXP = 0x2111;
317
318     // Procedure name
319
static final int PRCNAM = 0x2138;
320
321     // Query Attribute for Updatability
322
static final int QRYATTUPD = 0x2150;
323
324     // Cursor Allows Read, Delete, and Update Operations.
325
static final int QRYUPD = 0x4;
326
327     // Relational Database codepoint constant. Min. level 3.
328
static final int RDB = 0x240F;
329
330     // RDB Access Manager Class.
331
static final int RDBACCCL = 0x210F;
332
333     // RDB Allow Updates
334
static final int RDBALWUPD = 0x211A;
335
336     // Query Relative Scrolling Action
337
static final int QRYRELSCR = 0x213C;
338
339     // Query Scroll Orientation
340
static final int QRYSCRORN = 0x2152;
341
342     // Query Row Number
343
static final int QRYROWNBR = 0x213D;
344
345     // Query Row Sensitivity
346
static final int QRYROWSNS = 0x2153;
347
348     // Query Refresh Answer set table
349
static final int QRYRFRTBL = 0x213E;
350
351     // Query Attribute for Scrollability
352
static final int QRYATTSCR = 0x2149;
353
354     // Query Attribute for Sensitivity
355
static final int QRYATTSNS = 0x2157;
356
357     // Query Block Reset
358
static final int QRYBLKRST = 0x2154;
359
360     // Query Rowset Size
361
static final int QRYROWSET = 0x2156;
362
363     // Query Returns Data
364
static final int QRYRTNDTA = 0x2155;
365
366     // RDB interrupt token.
367
static final int RDBINTTKN = 0x2103;
368
369     // Relational Database Name codepoint constant.
370
static final int RDBNAM = 0x2110;
371
372     // RDB Collection Identifier
373
static final int RDBCOLID = 0x2108;
374
375     // Resource name information
376
static final int RSCNAM = 0x112D;
377
378     // Resource Type Information
379
static final int RSCTYP = 0x111F;
380
381     // Reason Code Information
382
static final int RSNCOD = 0x1127;
383
384     // Resynchronization Manager. Min levl 5.
385
// It is a manager object of DDM that performs
386
// resynchronization for in-doubt units of work after
387
// a sync point operation failure.
388
static final int RSYNCMGR = 0x14C1;
389
390     // Retuan SQL Descriptor Area
391
static final int RTNSQLDA = 0x2116;
392
393     // Type of SQL Descriptor Area
394
static final int TYPSQLDA = 0x2146;
395
396     // Security Check Code codepoint constant.
397
static final int SECCHKCD = 0x11A4;
398
399     // Security Mechanism codepoint constant.
400
static final int SECMEC = 0x11A2;
401
402     // Security Manager codepoint constant.
403
static final int SECMGR = 0x1440;
404
405     // Security Manager Name codepoint constant.
406
static final int SECMGRNM = 0x1196;
407
408     // Security Token codepoint constant.
409
static final int SECTKN = 0x11DC;
410
411     // Return of EXTDTA Option
412
static final int RTNEXTDTA = 0x2148;
413
414     // Return of EXTDTA Option - Return EXTDTAs by Row
415
static final int RTNEXTROW = 0x1;
416
417     // Return of EXTDTA Option - Return All EXTDTAs for QRYDTA's Sent
418
static final int RTNEXTALL = 0x2;
419
420     // Supervisor name codepoint constant.
421
static final int SPVNAM = 0x115D;
422
423     // SQL Application Manager codepoint constant. Min. level 3.
424
static final int SQLAM = 0x2407;
425
426     // SQL Communication Area Reply Data codepoint constant.
427
static final int SQLCARD = 0x2408;
428
429     // Hold Cursor Position
430
static final int SQLCSRHLD = 0x211F;
431
432     // SQLDA Reply Data codepoint constant.
433
static final int SQLDARD = 0x2411;
434
435     // Server Class Name codepoint constant.
436
static final int SRVCLSNM = 0x1147;
437
438     // Server Diagnostic Information codepoint constant.
439
static final int SRVDGN = 0x1153;
440
441     // Server List codepoint constant.
442
static final int SRVLST = 0x244E;
443
444     // Server Name codepoint constant.
445
static final int SRVNAM = 0x116D;
446
447     // Server Product Release Level codepoint constant.
448
static final int SRVRLSLV = 0x115A;
449
450     //Statement Decimal Delimiter
451
static final int STTDECDEL = 0x2121;
452
453     //Statement String Delimiter
454
static final int STTSTRDEL = 0x2120;
455
456     // Supervisor.
457
// Manages a collection of managers in a consistent manner.
458
static final int SUPERVISOR = 0x143C;
459
460     // Security Service Error Number codepoint constant.
461
static final int SVCERRNO = 0x11B4;
462
463     // Severity Code codepoint constant.
464
static final int SVRCOD = 0x1149;
465
466     // Sync Point Manager. Min. level 4.
467
// It is a manager object of DDM that coordinates resource
468
// recovery of the units of work associated with recoverable
469
// resources in multiple DDM servers.
470
static final int SYNCPTMGR = 0x14C0;
471
472     // Syntax Error code
473
static final int SYNERRCD = 0x114A;
474
475     // Data Type Definition Name codepoint constant.
476
static final int TYPDEFNAM = 0x002F;
477
478     // TYPDEF Overrides codepoint constant.
479
static final int TYPDEFOVR = 0x0035;
480
481     // Unit of Word Disposition codepoint constant.
482
static final int UOWDSP = 0x2115;
483
484     // Usrid codepoint constant.
485
static final int USRID = 0x11A0;
486
487     // Version name
488
static final int VRSNAM = 0x1144;
489
490     // Rdb Package Name, Consistency Token, and Section
491
// Number codepoint constant.
492
static final int PKGNAMCSN = 0x2113;
493
494     // SQL Error Diagnostic Level
495
static final int DIAGLVL = 0x2160;
496
497     //-----------------------DDM reply codepoints---------------------------------
498

499     // Invalid description
500
static final int DSCINVRM = 0x220A;
501
502     // Codepoint for Command Authorization for Agent Permanent Error
503
static final int CMDATHRM = 0x121C;
504
505     // Command Check codepoint constant.
506
static final int CMDCHKRM = 0x1254;
507
508     // Command Not Supported codepoint constant.
509
static final int CMDNSPRM = 0x1250;
510
511     // Codepoint for Agent Permanent Error Reply message
512
static final int AGNPRMRM = 0x1232;
513
514     static final int BGNBNDRM = 0x2208;
515
516     // Abnormal End of Unit of Work Condition codepoint constant.
517
static final int ABNUOWRM = 0x220D;
518
519     // Access to RDB Completed.
520
// Specifies that an instance of the SQL application manager
521
// has been created and is bound to the specified RDB.
522
static final int ACCRDBRM = 0x2201;
523
524     final static int CMDCMPRM = 0x124B;
525
526     final static int MGRLVLRM = 0x1210;
527
528     // Manager dependency Error
529
static final int MGRDEPRM = 0x1218;
530
531     // End Unit of Work Condition codepoint constant.
532
static final int ENDUOWRM = 0x220C;
533
534     // Object Not Supported codepoint constant.
535
static final int OBJNSPRM = 0x1253;
536
537     // Conversational Protocol Error
538
static final int PRCCNVRM = 0x1245;
539
540     // Parameter Not Supported codepoint constant.
541
static final int PRMNSPRM = 0x1251;
542
543     // RDB Package Binding Process Not active Codepoint
544
static final int PKGBNARM = 0x2206;
545
546     // RDB Package Binding Process Active codepoint constant.
547
static final int PKGBPARM = 0x2209;
548
549     // Query not open codepoint constant.
550
static final int QRYNOPRM = 0x2202;
551
552     // Query previously opened codepoint
553
static final int QRYPOPRM = 0x220F;
554
555     // RDB Currently Accessed Codepoint
556
static final int RDBACCRM = 0x2207;
557
558     // Security Check.
559
// Indicates the acceptability of the security information.
560
static final int SECCHKRM = 0x1219;
561
562     // RDB Access Failed Reply Message codepoint
563
static final int RDBAFLRM = 0x221A;
564
565     // Not Authorized To RDB reply message codepoint
566
static final int RDBATHRM = 0x22CB;
567
568     // RDB Not Accessed codepoint constant.
569
static final int RDBNACRM = 0x2204;
570
571     // RDB not found codepoint
572
static final int RDBNFNRM = 0x2211;
573
574     // RDB Update Reply Message codepoint constant.
575
static final int RDBUPDRM = 0x2218;
576
577     // Resources Limits Reached
578
static final int RSCLMTRM = 0x1233;
579
580     // Data Stream Syntax Error
581
static final int SYNTAXRM = 0x124C;
582
583     // Target Not Supported
584
static final int TRGNSPRM = 0x125F;
585
586     // Parameter Value Not Supported codepoint constant.
587
static final int VALNSPRM = 0x1252;
588
589     // SQL Error Condition codepoint constant.
590
static final int SQLERRRM = 0x2213;
591
592     final static int OPNQRYRM = 0x2205;
593     final static int ENDQRYRM = 0x220B;
594     final static int DTAMCHRM = 0x220E;
595     final static int OPNQFLRM = 0x2212;
596     final static int RSLSETRM = 0x2219;
597     final static int CMDVLTRM = 0x221D;
598     final static int CMMRQSRM = 0x2225;
599
600     //-----------------------ddm enumerated values-------------------------------
601

602     // TYPSQLDA - Standard Output SQLDA
603
static final int TYPSQLDA_STD_OUTPUT = 0;
604
605     // TYPSQLDA - Standard Input SQLDA
606
static final int TYPSQLDA_STD_INPUT = 1;
607
608     // TYPSQLDA - Light Output SQLDA
609
static final int TYPSQLDA_LIGHT_OUTPUT = 2;
610
611     // TYPSQLDA - Light Input SQLDA
612
static final int TYPSQLDA_LIGHT_INPUT = 3;
613
614     // TYPSQLDA - Extended Output SQLDA
615
static final int TYPSQLDA_X_OUTPUT = 4;
616
617     // TYPSQLDA - Extended Input SQLDA
618
static final int TYPSQLDA_X_INPUT = 5;
619
620
621
622     // QRYCLSIMP - Target Server determines whether to implicitly
623
// close the cursor or not upon SQLSTATE 02000 based on cursor type.
624
static final int QRYCLSIMP_SERVER_CHOICE = 0x00;
625     
626     // QRYCLSIMP - Target Server must implicitly close the cursor
627
// upon SQLSTATE 02000.
628
static final int QRYCLSIMP_YES = 0x01;
629     
630     // QRYCLSIMP - Target Server must not implicitly close the cursor
631
// upon SQLSTATE 02000.
632
static final int QRYCLSIMP_NO = 0x02;
633
634     // QRYCLSRLS - Do not release read locks when the query is closed
635
static final int QRYCLSRLS_NO = 0x00;
636     
637     // QRYCLSRLS - Release read locks when the query is closed
638
static final int QRYCLSRLS_YES = 0x01;
639
640     // QRYBLKFCT - No 'OPTIMIZE for N ROWS' clause associated with
641
// the select statement for the cursor.
642
static final int QRYBLKFCT_NONE = 0x00;
643     
644     // QRYBLKEXA - Every query block is exactly the size specified
645
// in the QRYBLKSZ parameter, except for possibly the last
646
// query block which may be shorter.
647
static final int QRYBLKEXA = 0x00;
648
649     // QRYBLKFLX - Every query block is at least the size specified
650
// in the QRYBLKSZ parameter, except for possibly the last
651
// query block which may be shorter.
652
static final int QRYBLKFLX = 0x01;
653
654     // SQL Error Diagnostic Level
655
// DIAGLVL0 A null SQLDIAGGRP is returned. This is the default.
656
// DIAGLVL1 A non-null SQLDIAGGRP should be returned.
657
// DIAGLVL2 A non-null SQLDIAGGRP should be returned, and both SQLDCMSG
658
// message text fields should be returned as null strings.
659
static final byte DIAGLVL0 = (byte)0xF0;
660     static final byte DIAGLVL1 = (byte)0xF1;
661     static final byte DIAGLVL2 = (byte)0xF2;
662     
663     //----------------------------fdoca code points-------------------------------
664

665     // Externalized FD:OCA Data codepoint constant.
666
static final int EXTDTA = 0x146C;
667
668     // FDOCA data descriptor
669
static final int FDODSC = 0x0010;
670
671     // FDOCA data
672
static final int FDODTA = 0x147A;
673
674     // FDOCA Descriptor offset
675
static final int FDODSCOFF = 0x2118;
676
677     // FDOCA Triplet Parameter offset
678
static final int FDOPRMOFF = 0x212B;
679
680     // FDOCA Triplet offset
681
static final int FDOTRPOFF = 0x212A;
682
683     //--------------------------ddm error code points---------------------------------
684
static final int SYNERRCD_DSS_LESS_THAN_6 = 0x01;
685     static final int SYNERRCD_DSS_LENGTH_BYTE_NUMBER_MISMATCH = 0x02;
686     static final int SYNERRCD_CBYTE_NOT_D0 = 0x03;
687     static final int SYNERRCD_FBYTE_NOT_SUPPORTED = 0x04;
688     static final int SYNERRCD_OBJ_LEN_LESS_THAN_4 = 0x07;
689     static final int SYNERRCD_TOO_BIG = 0x09;
690     static final int SYNERRCD_OBJ_LEN_NOT_ALLOWED = 0x0B;
691     static final int SYNERRCD_INCORRECT_EXTENDED_LEN = 0x0C;
692     static final int SYNERRCD_REQ_OBJ_NOT_FOUND = 0x0E;
693     static final int SYNERRCD_TOO_MANY = 0x0F;
694     static final int SYNERRCD_DUP_OBJ_PRESENT = 0x12;
695     static final int SYNERRCD_INVALID_CORRELATOR = 0x13;
696     static final int SYNERRCD_REQ_VAL_NOT_FOUND = 0x14;
697     static final int SYNERRCD_DSS_CONT_LESS_OR_EQUAL_2 = 0x16;
698     static final int SYNERRCD_CHAIN_OFF_SAME_NEXT_CORRELATOR = 0x18;
699     static final int SYNERRCD_CHAIN_OFF_ERROR_CONTINUE = 0x1A;
700     static final int SYNERRCD_INVALID_CP_FOR_CMD = 0x1D;
701
702     static final int PRCCNVCD_OBJDSS_SENT_NOT_ALLOWED = 0x03;
703     static final int PRCCNVCD_EXCSAT_FIRST_AFTER_CONN = 0x06;
704     static final int PRCCNVCD_ACCSEC_SECCHK_WRONG_STATE = 0x11;
705     static final int PRCCNVCD_RDBNAM_MISMATCH = 0x12;
706
707     static final int SVRCOD_INFO = 0; // Information Only Severity Code
708
static final int SVRCOD_WARNING = 4; // Warning Severity Code
709
static final int SVRCOD_ERROR = 8; // Error Severity Code
710
static final int SVRCOD_SEVERE = 16; // Severe Error Severity Code
711
static final int SVRCOD_ACCDMG = 32; // Access Damage Severity Code
712
static final int SVRCOD_PRMDMG = 64; // Permanent Damage Severity Code
713
static final int SVRCOD_SESDMG = 128; // Session Damage Severity Code
714

715     //---------------------- Security Mechanisms ---------------------------
716
static final int SECMEC_DCESEC = 1; // Distributed Computing Environment Security
717
static final int SECMEC_USRIDPWD = 3; // Userid and Password
718
static final int SECMEC_USRIDONL = 4; // Userid only
719
static final int SECMEC_USRIDNWPWD = 5; // Userid, Password, and new Password
720
static final int SECMEC_USRSBSPWD = 6; // Userid with substitute password
721
static final int SECMEC_USRENCPWD = 7; // Userid with encrypted password
722
static final int SECMEC_USRSSBPWD = 8; // Userid with Strong password substitute
723
static final int SECMEC_EUSRIDPWD = 9; // Encrpyted userid and password
724
static final int SECMEC_EUSRIDNWPWD = 10; // Encrpyted userid and password
725

726     //---------------------Security Check Codes ---------------------------
727
static final int SECCHKCD_OK = 0; // Security info correct and acceptable
728
static final int SECCHKCD_NOTSUPPORTED = 0x01; // SECMEC value not supported
729
static final int SECCHKCD_SECTKNMISSING_OR_INVALID = 0x0E; // SECTKN missing or invalid
730
static final int SECCHKCD_PASSWORDMISSING = 0x10; // Password missing
731
static final int SECCHKCD_USERIDMISSING = 0x12; // User Id missing
732
static final int SECCHKCD_USERIDINVALID = 0x13; // Userid invalid
733

734     //----------------------Type Definition Names we care about -----------
735
static final String JavaDoc TYPDEFNAM_QTDSQLASC = "QTDSQLASC"; // ASCII
736
static final String JavaDoc TYPDEFNAM_QTDSQLJVM = "QTDSQLJVM"; // Java platform
737
static final String JavaDoc TYPDEFNAM_QTDSQLX86 = "QTDSQLX86"; // Intel X86 platform
738

739     //----------------------Max sizes for strings in the protocol ---------
740
static final int MAX_NAME = 255;
741     static final int RDBNAM_LEN = 18; //dbname fixed length for SQLAM level 6, for level 7,
742
//limit is MAX_NAME (255)
743
static final int PRDID_MAX = 8;
744     static final int RDBCOLID_LEN = 18;
745     static final int PKGID_LEN = 18;
746     static final int PKGCNSTKN_LEN = 8;
747     static final int PKGNAMCSN_LEN = RDBNAM_LEN + RDBCOLID_LEN + PKGID_LEN +
748         PKGCNSTKN_LEN + 2;
749
750     //---------------------QRYBLSZ min and maximum
751
static final int QRYBLKSZ_MIN = 512;
752     static final int QRYBLKSZ_MAX = 10*1024*1024;
753     static final int QRYROWSET_MAX = 32767;
754     static final int QRYROWSET_DEFAULT = -1;
755
756     //--------------------Defaults for QRYBLKCTL and MAXBLKEXT
757
static final int QRYBLKCTL_DEFAULT = LMTBLKPRC;
758     static final int MAXBLKEXT_NONE = 0;
759     static final int MAXBLKEXT_DEFAULT = MAXBLKEXT_NONE;
760
761     //-------------- QRYSCRORN - query scroll orientation values
762
static final int QRYSCRREL = 1; // relative fetch
763
static final int QRYSCRABS = 2; // absolute fetch
764
static final int QRYSCRAFT = 3; // after last row
765
static final int QRYSCRBEF = 4; // before first row
766

767     //---------------OUTOVROPT - output override option values
768
static final int OUTOVRFRS = 1; // Output Override allowed on first CNTQRY
769
static final int OUTOVRANY = 2; // Output Override allowed on any CNTQRY
770

771
772
773     //--------------------------XA code points---------------------------
774

775     
776     // Release conversation
777
public static final int RLSCONV = 0x119F;
778
779     // SYNC Point Control Reply
780
public static final int SYNCCRD = 0x1248;
781     
782     // XA Return Value
783
public static final int XARETVAL = 0x1904;
784     
785     // XA Timeout Value;
786
public static final int TIMEOUT = 0x1907;
787
788     // new unit of work for XA
789
public static final int SYNCTYPE_NEW_UOW = 0x09;
790     
791     // End unit of work (Sync type).
792
public static final int SYNCTYPE_END_UOW = 0x0B;
793     
794     // Prepare to commit (Sync type).
795
public static final int SYNCTYPE_PREPARE = 0x01;
796     
797     // migrate to resync server sync type
798
public static final int SYNCTYPE_MIGRATE = 0x02;
799     
800     // commit sync type
801
public static final int SYNCTYPE_COMMITTED = 0x03;
802     
803     // request to commit sync type
804
public static final int SYNCTYPE_REQ_COMMIT = 0x05;
805
806     // request to forget sync type
807
public static final int SYNCTYPE_REQ_FORGET = 0x06;
808     
809     //rollback sync type
810
public static final int SYNCTYPE_ROLLBACK = 0x04;
811     
812     // Request Sync log information (Sync type).
813
static final int SYNCTYPE_REQ_LOG = 0x08;
814
815     // migrated unit of work sync type
816
public static final int SYNCTYPE_MIGRATED = 0x0A;
817     
818     //recover sync type
819
public static final int SYNCTYPE_INDOUBT = 0x0C;
820
821     
822     // Forget unit of work.
823
public static final int FORGET = 0x1186;
824     
825     // SYNC Type Codepoint
826
public static final int SYNCTYPE = 0x1187;
827     
828     // XId Codepoint
829
public static final int XID = 0x1801;
830     
831     // XA Flag Codepoint
832
public static final int XAFLAGS = 0x1903;
833     
834     // Resync Type
835
public static final int RSYNCTYP = 0x11EA;
836     
837     // Sync Resync Reply
838
public static final int SYNCRRD = 0x126D;
839     
840     // XA Flags
841
public static final int TMNOFLAGS = 0x00000000;
842     
843
844     // Prepared and hueristic complete list
845
static final int PRPHRCLST = 0x1905;
846     
847     // XID count
848
static final int XIDCNT = 0x1906;
849     
850     
851     //-----------------------Manager code points --------------------------
852

853     protected static int [] MGR_CODEPOINTS = {
854                                             AGENT,
855                                             CCSIDMGR,
856                                             CMNAPPC,
857                                             CMNSYNCPT,
858                                             CMNTCPIP,
859                                             DICTIONARY,
860                                             RDB,
861                                             RSYNCMGR,
862                                             SECMGR,
863                                             SQLAM,
864                                             SUPERVISOR,
865                                             SYNCPTMGR,
866                                             XAMGR
867                                             };
868     protected static final int UNKNOWN_MANAGER = -1;
869
870     // hide the default constructor
871
private CodePoint () {}
872
873     /**
874      * Given a manager codepoint find it's location in the managers array
875      *
876      * @return index into manager array or UNKNOWN_MANAGER if not found
877      */

878     protected static int getManagerIndex(int manager)
879     {
880         for (int i = 0; i < MGR_CODEPOINTS.length; i++)
881             if (MGR_CODEPOINTS[i] == manager)
882                 return i;
883         return UNKNOWN_MANAGER;
884     }
885     /**
886      * Check if a manager codepoint is a known manager
887      *
888      * @return true if known, false otherwise
889      */

890     protected static boolean isKnownManager(int manager)
891     {
892         for (int i = 0; i < CodePoint.MGR_CODEPOINTS.length; i++)
893             if (manager == CodePoint.MGR_CODEPOINTS[i])
894                 return true;
895         return false;
896     }
897 }
898
Popular Tags