1 21 package org.apache.derby.client.net; 22 23 import org.apache.derby.iapi.reference.DRDAConstants; 24 import org.apache.derby.client.am.Version; 25 26 public class NetConfiguration { 27 29 static final int INITIAL_CAPACITY = 10; 31 public static final byte NON_CHAR_DDM_DATA_PAD_BYTE = 0x00; 33 34 static final int CURSOR_NOT_OPEN = 0; 35 static final int CURSOR_OPEN = 1; 36 static final int CURSOR_CLOSE_ONLY = 2; 37 38 static final int DDMHDR_LENGTH = 4; 40 41 static final int DSSHDR_LENGTH = 6; 43 44 static final int EXTNAM_MAXSIZE = 255; 46 47 static final int MIN_AGENT_MGRLVL = 3; 49 50 static final int MIN_CMNTCPIP_MGRLVL = 5; 52 53 static final int MIN_CMNAPPC_MGRLVL = 3; 55 56 static final int MIN_RDB_MGRLVL = 3; 58 59 static final int MIN_SECMGR_MGRLVL = 5; 61 62 static final int MIN_SQLAM_MGRLVL = 4; 64 65 static final int MIN_XAMGR_MGRLVL = 7; 67 68 static final int MIN_SYNCPTMGR_MGRLVL = 5; 70 71 static final int MIN_RSYNCMGR_MGRLVL = 5; 73 74 static final int PASSWORD_MAXSIZE = 255; 76 77 public static final int PRDDTA_APPL_ID_FIXED_LEN = 20; 79 80 static final int PRDDTA_ACCT_SUFFIX_LEN_BYTE = 55; 82 83 static final int PRDDTA_MAX_ACCT_SUFFIX_LEN = 199; 85 86 static final int PRDDTA_LEN_BYTE = 0; 88 89 static final int PRDDTA_MAXSIZE = 255; 91 92 public static final String PRDDTA_PLATFORM_ID = "JVM "; 94 95 public static final int PRDDTA_USER_ID_FIXED_LEN = 8; 97 98 public static final int PKG_IDENTIFIER_FIXED_LEN = 18; 100 101 static final int PKG_IDENTIFIER_MAX_LEN = 255; 103 104 public static final int PKGCNSTKN_FIXED_LEN = 8; 106 107 static final int SECTKN_MAXSIZE = 32763; 113 static final String SRVCLSNM_JVM = "QDERBY/JVM"; 115 116 static final int SRVNAM_MAXSIZE = 255; 118 119 static final int MGRLVL_NA = 0; 121 122 static final int MGRLVL_3 = 0x03; 124 125 static final int MGRLVL_4 = 0x04; 127 128 static final int MGRLVL_5 = 0x05; 130 131 static final int MGRLVL_6 = 0x06; 133 134 static final public int MGRLVL_7 = 0x07; 136 137 static final int SECMEC_DCESEC = 0x01; 139 140 static final int SECMEC_EUSRIDNWPWD = 0x0A; 143 144 public static final int SECMEC_EUSRIDPWD = 0x09; 146 147 public static final int SECMEC_USRIDONL = 0x04; 149 150 public static final int SECMEC_USRENCPWD = 0x07; 152 153 static final int SECMEC_USRIDNWPWD = 0x05; 155 156 public static final int SECMEC_USRIDPWD = 0x03; 158 159 public static final int SECMEC_EUSRIDDTA = 0x0C; 161 162 public static final int SECMEC_EUSRPWDDTA = 0x0D; 164 165 public static final int SECMEC_USRSSBPWD = 0x08; 167 168 static final int[] SECMGR_SECMECS = {NetConfiguration.SECMEC_EUSRIDPWD, 170 NetConfiguration.SECMEC_USRENCPWD, 171 NetConfiguration.SECMEC_USRIDPWD, 172 NetConfiguration.SECMEC_USRIDONL, 173 NetConfiguration.SECMEC_EUSRIDDTA, 174 NetConfiguration.SECMEC_EUSRPWDDTA, 175 NetConfiguration.SECMEC_USRSSBPWD}; 176 177 178 public static final String SYSTEM_ASC = "QTDSQLASC"; 180 181 static final String SYSTEM_JVM = "QTDSQLJVM"; 183 184 static final int USRID_MAXSIZE = 255; 186 187 public static String PRDID; 189 190 static String SRVRLSLV; 193 194 static { 196 int majorVersion = Version.getMajorVersion(); 197 int minorVersion = Version.getMinorVersion(); 198 int protocolMaintVersion = Version.getProtocolMaintVersion(); 199 200 205 String prdId = DRDAConstants.DERBY_DRDA_CLIENT_ID; 206 if (majorVersion < 10) { 207 prdId += "0"; 208 } 209 prdId += majorVersion; 210 211 if (minorVersion < 10) { 212 prdId += "0"; 213 } 214 215 prdId += minorVersion; 216 prdId += protocolMaintVersion; 217 PRDID = prdId; 218 SRVRLSLV = prdId + "/" + Version.getDriverVersion(); 219 } 220 221 } 222 | Popular Tags |