Package org.firebirdsql.jca
Class FBConnectionRequestInfo
- java.lang.Object
- 
- org.firebirdsql.jca.FBConnectionRequestInfo
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Iterable<Parameter>,- javax.resource.cci.ConnectionSpec,- javax.resource.spi.ConnectionRequestInfo,- ConnectionParameterBuffer,- DatabaseParameterBuffer,- DatabaseParameterBufferExtension,- ParameterBuffer
 
 public class FBConnectionRequestInfo extends java.lang.Object implements DatabaseParameterBufferExtension, javax.resource.spi.ConnectionRequestInfo, javax.resource.cci.ConnectionSpec, java.io.Serializable The classFBConnectionRequestInfoholds a clumplet that is used to store and transfer connection-specific information such as user, password, and other dpb information..- Version:
- 2.0
- Author:
- David Jencks, Roman Rokytskyy
- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from interface org.firebirdsql.gds.DatabaseParameterBufferACTIVATE_SHADOW, ADDRESS_PATH, ALLOCATION, BEGIN_LOG, BUFFER_LENGTH, CACHE_MANAGER, CDD_PATHNAME, CONNECT_TIMEOUT, DAMAGED, DBKEY_SCOPE, DEBUG, DELETE_SHADOW, DISABLE_JOURNAL, DISABLE_WAL, DROP_WALFILE, DUMMY_PACKET_INTERVAL, ENABLE_JOURNAL, ENCRYPT_KEY, FORCE_WRITE, GARBAGE_COLLECT, GBAK_ATTACH, GFIX_ATTACH, GSEC_ATTACH, GSTAT_ATTACH, INTERP, JOURNAL, LC_CTYPE, LC_MESSAGES, LICENSE, NO_DB_TRIGGERS, NO_GARBAGE_COLLECT, NO_RESERVE, NUM_BUFFERS, NUMBER_OF_USERS, OLD_DUMP_ID, OLD_FILE, OLD_FILE_SIZE, OLD_NUM_FILES, OLD_START_FILE, OLD_START_PAGE, OLD_START_SEQNO, ONLINE, ONLINE_DUMP, OVERWRITE, PAGE_SIZE, PASSWORD, PASSWORD_ENC, PROCESS_ID, PROCESS_NAME, QUIT_LOG, RESERVED, SEC_ATTACH, SET_DB_CHARSET, SET_DB_READONLY, SET_DB_SQL_DIALECT, SET_PAGE_BUFFERS, SHUTDOWN, SHUTDOWN_DELAY, SQL_DIALECT, SQL_ROLE_NAME, SWEEP, SWEEP_INTERVAL, SYS_USER_NAME, SYS_USER_NAME_ENC, TRACE, TRUSTED_AUTH, USER, USER_NAME, VERIFY, WAL_BACKUP_DIR, WAL_BUFSIZE, WAL_CHKPTLEN, WAL_GRP_CMT_WAIT, WAL_NUMBUFS, WORKING_DIRECTORY
 - 
Fields inherited from interface org.firebirdsql.gds.impl.DatabaseParameterBufferExtensionBLOB_BUFFER_SIZE, COLUMN_LABEL_FOR_NAME, DB_CRYPT_CONFIG, EXTENSION_PARAMETERS, FILENAME_CHARSET, GENERATED_KEYS_ENABLED, IGNORE_PROCEDURE_TYPE, LOCAL_ENCODING, MAPPING_PATH, NO_RESULT_SET_TRACKING, OCTETS_AS_BYTES, PARANOIA_MODE, RESULT_SET_HOLDABLE, SO_TIMEOUT, SOCKET_BUFFER_SIZE, TIMESTAMP_USES_LOCAL_TIMEZONE, USE_FIREBIRD_AUTOCOMMIT, USE_STANDARD_UDF, USE_STREAM_BLOBS, WIRE_CRYPT_LEVEL
 
- 
 - 
Constructor SummaryConstructors Constructor Description FBConnectionRequestInfo(DatabaseParameterBuffer dpb)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddArgument(int argumentType)Add argument with no parameters.voidaddArgument(int argumentType, byte[] content)Add array of bytes.voidaddArgument(int argumentType, int value)Add integer argument.voidaddArgument(int argumentType, long value)Add long argument.voidaddArgument(int argumentType, java.lang.String value)Add string argument with the default encoding.voidaddArgument(int argumentType, java.lang.String value, Encoding encoding)Add string argument.DatabaseParameterBufferdeepCopy()Perform a deep copy of this object, returning the copied instance.booleanequals(java.lang.Object obj)intgetArgumentAsInt(int argumentType)Get argument as int.java.lang.StringgetArgumentAsString(int argumentType)Get argument as string.EncodinggetDefaultEncoding()DatabaseParameterBuffergetDpb()Get the underlying Database Parameter Buffer for this object.ParameterTagMappinggetTagMapping()intgetType()booleanhasArgument(int argumentType)Check if this parameter buffer has specified argument.inthashCode()java.util.Iterator<Parameter>iterator()Returns an iterator over a copy of the parameters in this parameter buffer.voidremoveArgument(int argumentType)Remove specified argument.DatabaseParameterBufferremoveExtensionParams()Remove extension parameters in the newly created deep copy of this class.voidsetPassword(java.lang.String password)voidsetUserName(java.lang.String userName)intsize()byte[]toBytes()Converts this parameter buffer to a byte array.byte[]toBytesWithType()Converts this parameter buffer to a byte array with type information.XdrabletoXdrable()voidwriteArgumentsTo(java.io.OutputStream outputStream)Writes the arguments in the implementation specific serialization into theOutputStream.
 
- 
- 
- 
Constructor Detail- 
FBConnectionRequestInfopublic FBConnectionRequestInfo(DatabaseParameterBuffer dpb) 
 
- 
 - 
Method Detail- 
deepCopypublic DatabaseParameterBuffer deepCopy() Perform a deep copy of this object, returning the copied instance.- Specified by:
- deepCopyin interface- DatabaseParameterBuffer
- Returns:
- A deep-copied copy of this FBConnectionRequestInfo object
 
 - 
getDpbpublic DatabaseParameterBuffer getDpb() Get the underlying Database Parameter Buffer for this object.- Returns:
- The underlying dpb for this object
 
 - 
addArgumentpublic void addArgument(int argumentType, byte[] content)Description copied from interface:ParameterBufferAdd array of bytes.- Specified by:
- addArgumentin interface- ParameterBuffer
- Parameters:
- argumentType- type of argument.
- content- content of argument.
 
 - 
addArgumentpublic void addArgument(int argumentType, int value)Description copied from interface:ParameterBufferAdd integer argument.- Specified by:
- addArgumentin interface- ParameterBuffer
- Parameters:
- argumentType- type of argument.
- value- integer value to add.
 
 - 
addArgumentpublic void addArgument(int argumentType, long value)Description copied from interface:ParameterBufferAdd long argument.- Specified by:
- addArgumentin interface- ParameterBuffer
- Parameters:
- argumentType- type of argument.
- value- long value to add.
 
 - 
addArgumentpublic void addArgument(int argumentType, java.lang.String value)Description copied from interface:ParameterBufferAdd string argument with the default encoding.- Specified by:
- addArgumentin interface- ParameterBuffer
- Parameters:
- argumentType- type of argument.
- value- string value to add.
 
 - 
addArgumentpublic void addArgument(int argumentType, java.lang.String value, Encoding encoding)Description copied from interface:ParameterBufferAdd string argument.- Specified by:
- addArgumentin interface- ParameterBuffer
- Parameters:
- argumentType- type of argument.
- value- string value to add.
- encoding- encoding to use for conversion to bytes
 
 - 
getTypepublic int getType() - Specified by:
- getTypein interface- ParameterBuffer
- Returns:
- The parameter buffer type identifier
 
 - 
addArgumentpublic void addArgument(int argumentType) Description copied from interface:ParameterBufferAdd argument with no parameters.- Specified by:
- addArgumentin interface- ParameterBuffer
- Parameters:
- argumentType- type of argument.
 
 - 
getArgumentAsIntpublic int getArgumentAsInt(int argumentType) Description copied from interface:ParameterBufferGet argument as int.- Specified by:
- getArgumentAsIntin interface- ParameterBuffer
- Parameters:
- argumentType- type of argument to find.
- Returns:
- argument as string or 0if nothing found.
 
 - 
getArgumentAsStringpublic java.lang.String getArgumentAsString(int argumentType) Description copied from interface:ParameterBufferGet argument as string.- Specified by:
- getArgumentAsStringin interface- ParameterBuffer
- Parameters:
- argumentType- type of argument to find.
- Returns:
- argument as string or nullif nothing found.
 
 - 
hasArgumentpublic boolean hasArgument(int argumentType) Description copied from interface:ParameterBufferCheck if this parameter buffer has specified argument.- Specified by:
- hasArgumentin interface- ParameterBuffer
- Parameters:
- argumentType- type of argument to find.
- Returns:
- trueif this buffer contains specified argument.
 
 - 
removeArgumentpublic void removeArgument(int argumentType) Description copied from interface:ParameterBufferRemove specified argument.- Specified by:
- removeArgumentin interface- ParameterBuffer
- Parameters:
- argumentType- type of argument to remove.
 
 - 
removeExtensionParamspublic DatabaseParameterBuffer removeExtensionParams() Description copied from interface:DatabaseParameterBufferExtensionRemove extension parameters in the newly created deep copy of this class.- Specified by:
- removeExtensionParamsin interface- DatabaseParameterBufferExtension
- Returns:
- a deep copy of this class where all extension parameters are removed; needed to filter Jaybird extensions that are not understood by Firebird.
 
 - 
iteratorpublic java.util.Iterator<Parameter> iterator() Description copied from interface:ParameterBufferReturns an iterator over a copy of the parameters in this parameter buffer.It is safe to iterate over this iterator while modifying the parameter buffer. Changes will not be reflected in the iterator. - Specified by:
- iteratorin interface- java.lang.Iterable<Parameter>
- Specified by:
- iteratorin interface- ParameterBuffer
- Returns:
- Iterator over the parameters in this parameter buffer.
 
 - 
writeArgumentsTopublic void writeArgumentsTo(java.io.OutputStream outputStream) throws java.io.IOExceptionDescription copied from interface:ParameterBufferWrites the arguments in the implementation specific serialization into theOutputStream.- Specified by:
- writeArgumentsToin interface- ParameterBuffer
- Parameters:
- outputStream- The- OutputStreamto write to
- Throws:
- java.io.IOException- Errors produced by the output stream during writes
 
 - 
toXdrablepublic Xdrable toXdrable() - Specified by:
- toXdrablein interface- ParameterBuffer
- Returns:
- Xdrableto write (and optionally read) this instance as Xdr.
 
 - 
toBytespublic byte[] toBytes() Description copied from interface:ParameterBufferConverts this parameter buffer to a byte array.This byte array includes the extra header-bytes (if any), but does not include the type information - Specified by:
- toBytesin interface- ParameterBuffer
- Returns:
- Byte array with serialization of this parameter buffer
- See Also:
- ParameterBuffer.toBytesWithType()
 
 - 
toBytesWithTypepublic byte[] toBytesWithType() Description copied from interface:ParameterBufferConverts this parameter buffer to a byte array with type information.This byte array includes the type information and the extra header bytes (if any). - Specified by:
- toBytesWithTypein interface- ParameterBuffer
- Returns:
- Byte array with serialization of this parameter buffer
- See Also:
- ParameterBuffer.toBytes()
 
 - 
sizepublic int size() - Specified by:
- sizein interface- ParameterBuffer
- Returns:
- the number of parameters stored.
 
 - 
setUserNamepublic void setUserName(java.lang.String userName) 
 - 
setPasswordpublic void setPassword(java.lang.String password) 
 - 
equalspublic boolean equals(java.lang.Object obj) - Specified by:
- equalsin interface- javax.resource.spi.ConnectionRequestInfo
- Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Specified by:
- hashCodein interface- javax.resource.spi.ConnectionRequestInfo
- Overrides:
- hashCodein class- java.lang.Object
 
 - 
getTagMappingpublic ParameterTagMapping getTagMapping() - Specified by:
- getTagMappingin interface- ConnectionParameterBuffer
- Returns:
- The tag mapping.
 
 - 
getDefaultEncodingpublic Encoding getDefaultEncoding() - Specified by:
- getDefaultEncodingin interface- ConnectionParameterBuffer
- Returns:
- The default encoding of string properties in this parameter buffer.
 
 
- 
 
-