Package org.apache.derby.impl.drda
Class AppRequester
- java.lang.Object
-
- org.apache.derby.impl.drda.AppRequester
-
class AppRequester extends java.lang.ObjectAppRequester stores information about the application requester. It is used so that multiple sessions can share information when they are started from the same version of the application requester.
-
-
Field Summary
Fields Modifier and Type Field Description private intclientTypeprotected static intDNC_CLIENTprotected java.lang.Stringextnamprivate int[]managerLevelsprotected static intMGR_LEVEL_UNKNOWNprivate static int[]MIN_MGR_LEVELSprotected intmodifyLevelprotected java.lang.Stringprdidprotected intreleaseLevelprotected java.lang.Stringspvnamprotected java.lang.Stringsrvclsnmprotected java.lang.Stringsrvnamprotected java.lang.Stringsrvrlslvprotected static intUNKNOWN_CLIENTprotected intversionLevel
-
Constructor Summary
Constructors Constructor Description AppRequester()AppRequester constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanequals(AppRequester a)Check if the application requester is the same as this oneprotected intgetClientType()Get the type of the client.protected intgetManagerLevel(int manager)get the Application requester manager levelprotected intgetTimestampLength()The timestamp length may be truncated for old versions of Derby.protected booleangreaterThanOrEqualTo(int vLevel, int rLevel, int mLevel)Check if provided JCC version level is greaterThanOrEqualTo current levelprotected booleanisXARequester()Is this an AppRequester that supports XA return true if XAMGR >= 7, false otherwiseprivate booleannotEquals(java.lang.Object a, java.lang.Object b)Check whether two objects are not equal when 1 of the objects could be nullprotected voidsetClientVersion(java.lang.String productId)protected voidsetManagerLevel(int manager, int managerLevel)set Application requester manager level if the manager level is less than the minimum manager level, set the manager level to zero (saying we can't handle this level), this will be returned to the application requester and he can decide whether or not to proceed For CCSIDMGR, if the target server supports the CCSID manager but not the CCSID requested, the value returned is FFFF For now, we won't support the CCSIDMGR since JCC doesn't request it.protected intsupportedMessageParamLength()Get the maximum length supported for an exception's message parameter string.protected booleansupportsBooleanValues()protected booleansupportsEXTDTAAbort()Tells whether the client sends a trailing Derby-specific status byte when transferring EXTDTA objects.protected booleansupportsLongerLDStrings()Return true if the client contains the fix for DERBY-5236, which allows DDMWriter.writeLDString() to write strings that need up to 64K-1 bytes when represented in UTF-8.protected booleansupportsQryclsimpForLmtblkprc()Check if the client expects QRYCLSIMP to be supported when the protocol is LMTBLKPRC.protected booleansupportsSecMecUSRSSBPWD()Returns true if Derby's client driver supports SECMEC_USRSSBPWD DRDA security mechanism.protected booleansupportsSessionDataCaching()protected booleansupportsTimestampNanoseconds()protected booleansupportsUDTs()protected booleansupportsUtf8Ccsid()Returns whether our AppRequester's UNICODEMGR supports UTF8 (CCSID 1208)
-
-
-
Field Detail
-
MGR_LEVEL_UNKNOWN
protected static final int MGR_LEVEL_UNKNOWN
- See Also:
- Constant Field Values
-
UNKNOWN_CLIENT
protected static final int UNKNOWN_CLIENT
- See Also:
- Constant Field Values
-
DNC_CLIENT
protected static final int DNC_CLIENT
- See Also:
- Constant Field Values
-
MIN_MGR_LEVELS
private static final int[] MIN_MGR_LEVELS
-
extnam
protected java.lang.String extnam
-
srvnam
protected java.lang.String srvnam
-
srvrlslv
protected java.lang.String srvrlslv
-
srvclsnm
protected java.lang.String srvclsnm
-
spvnam
protected java.lang.String spvnam
-
prdid
protected java.lang.String prdid
-
managerLevels
private int[] managerLevels
-
clientType
private int clientType
-
versionLevel
protected int versionLevel
-
releaseLevel
protected int releaseLevel
-
modifyLevel
protected int modifyLevel
-
-
Method Detail
-
getManagerLevel
protected int getManagerLevel(int manager)
get the Application requester manager level- Parameters:
manager- codepoint for manager we are looking for- Returns:
- manager level for that manager
-
setClientVersion
protected void setClientVersion(java.lang.String productId)
-
supportsSecMecUSRSSBPWD
protected boolean supportsSecMecUSRSSBPWD()
Returns true if Derby's client driver supports SECMEC_USRSSBPWD DRDA security mechanism.
-
supportsQryclsimpForLmtblkprc
protected final boolean supportsQryclsimpForLmtblkprc()
Check if the client expects QRYCLSIMP to be supported when the protocol is LMTBLKPRC.- Returns:
trueif QRYCLSIMP is supported for LMTBLKPRC
-
greaterThanOrEqualTo
protected boolean greaterThanOrEqualTo(int vLevel, int rLevel, int mLevel)Check if provided JCC version level is greaterThanOrEqualTo current level- Parameters:
vLevel- Version levelrLevel- Release levelmLevel- Modification level
-
setManagerLevel
protected void setManagerLevel(int manager, int managerLevel)set Application requester manager level if the manager level is less than the minimum manager level, set the manager level to zero (saying we can't handle this level), this will be returned to the application requester and he can decide whether or not to proceed For CCSIDMGR, if the target server supports the CCSID manager but not the CCSID requested, the value returned is FFFF For now, we won't support the CCSIDMGR since JCC doesn't request it.- Parameters:
manager- codepoint of the managermanagerLevel- level for that manager
-
equals
protected boolean equals(AppRequester a)
Check if the application requester is the same as this one- Parameters:
a- application requester to compare to- Returns:
- true if same false otherwise
-
notEquals
private boolean notEquals(java.lang.Object a, java.lang.Object b)Check whether two objects are not equal when 1 of the objects could be null- Parameters:
a- first objectb- second object- Returns:
- true if not equals false otherwise
-
supportedMessageParamLength
protected int supportedMessageParamLength()
Get the maximum length supported for an exception's message parameter string.
-
getClientType
protected int getClientType()
Get the type of the client.
-
isXARequester
protected boolean isXARequester()
Is this an AppRequester that supports XA return true if XAMGR >= 7, false otherwise
-
supportsEXTDTAAbort
protected boolean supportsEXTDTAAbort()
Tells whether the client sends a trailing Derby-specific status byte when transferring EXTDTA objects.- Returns:
trueif the status byte is sent,falseif not
-
supportsUtf8Ccsid
protected boolean supportsUtf8Ccsid()
Returns whether our AppRequester's UNICODEMGR supports UTF8 (CCSID 1208)- Returns:
trueif the AppRequester supports CCSID 1208,falseif not
-
supportsSessionDataCaching
protected boolean supportsSessionDataCaching()
-
supportsUDTs
protected boolean supportsUDTs()
-
supportsTimestampNanoseconds
protected boolean supportsTimestampNanoseconds()
-
supportsBooleanValues
protected boolean supportsBooleanValues()
-
supportsLongerLDStrings
protected boolean supportsLongerLDStrings()
Return true if the client contains the fix for DERBY-5236, which allows DDMWriter.writeLDString() to write strings that need up to 64K-1 bytes when represented in UTF-8. Otherwise, writeLDString() should use the old maximum length, which is 32700 bytes.
-
getTimestampLength
protected int getTimestampLength()
The timestamp length may be truncated for old versions of Derby. See DERBY-2602.
-
-