public class FBConnectionRequestInfo extends java.lang.Object implements DatabaseParameterBufferExtension, javax.resource.spi.ConnectionRequestInfo, javax.resource.cci.ConnectionSpec, java.io.Serializable
FBConnectionRequestInfo
holds a clumplet that is
used to store and transfer connection-specific information such as user,
password, and other dpb information..BLOB_BUFFER_SIZE, COLUMN_LABEL_FOR_NAME, DB_CRYPT_CONFIG, EXTENSION_PARAMETERS, FILENAME_CHARSET, 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
ACTIVATE_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
Constructor and Description |
---|
FBConnectionRequestInfo(DatabaseParameterBuffer dpb) |
Modifier and Type | Method and Description |
---|---|
void |
addArgument(int argumentType)
Add argument with no parameters.
|
void |
addArgument(int argumentType,
byte[] content)
Add array of bytes.
|
void |
addArgument(int argumentType,
int value)
Add integer argument.
|
void |
addArgument(int argumentType,
long value)
Add long argument.
|
void |
addArgument(int argumentType,
java.lang.String value)
Add string argument with the default encoding.
|
void |
addArgument(int argumentType,
java.lang.String value,
Encoding encoding)
Add string argument.
|
DatabaseParameterBuffer |
deepCopy()
Perform a deep copy of this object, returning the copied instance.
|
boolean |
equals(java.lang.Object obj) |
int |
getArgumentAsInt(int argumentType)
Get argument as int.
|
java.lang.String |
getArgumentAsString(int argumentType)
Get argument as string.
|
Encoding |
getDefaultEncoding() |
DatabaseParameterBuffer |
getDpb()
Get the underlying Database Parameter Buffer for this object.
|
ParameterTagMapping |
getTagMapping() |
int |
getType() |
boolean |
hasArgument(int argumentType)
Check if this parameter buffer has specified argument.
|
int |
hashCode() |
java.util.Iterator<Parameter> |
iterator()
Returns an iterator over a copy of the parameters in this parameter buffer.
|
void |
removeArgument(int argumentType)
Remove specified argument.
|
DatabaseParameterBuffer |
removeExtensionParams()
Remove extension parameters in the newly created deep copy of this class.
|
void |
setPassword(java.lang.String password) |
void |
setUserName(java.lang.String userName) |
int |
size() |
byte[] |
toBytes()
Converts this parameter buffer to a byte array.
|
byte[] |
toBytesWithType()
Converts this parameter buffer to a byte array with type information.
|
Xdrable |
toXdrable() |
void |
writeArgumentsTo(java.io.OutputStream outputStream)
Writes the arguments in the implementation specific serialization into the
OutputStream . |
public FBConnectionRequestInfo(DatabaseParameterBuffer dpb)
public DatabaseParameterBuffer deepCopy()
deepCopy
in interface DatabaseParameterBuffer
public DatabaseParameterBuffer getDpb()
public void addArgument(int argumentType, byte[] content)
ParameterBuffer
addArgument
in interface ParameterBuffer
argumentType
- type of argument.content
- content of argument.public void addArgument(int argumentType, int value)
ParameterBuffer
addArgument
in interface ParameterBuffer
argumentType
- type of argument.value
- integer value to add.public void addArgument(int argumentType, long value)
ParameterBuffer
addArgument
in interface ParameterBuffer
argumentType
- type of argument.value
- long value to add.public void addArgument(int argumentType, java.lang.String value)
ParameterBuffer
addArgument
in interface ParameterBuffer
argumentType
- type of argument.value
- string value to add.public void addArgument(int argumentType, java.lang.String value, Encoding encoding)
ParameterBuffer
addArgument
in interface ParameterBuffer
argumentType
- type of argument.value
- string value to add.encoding
- encoding to use for conversion to bytespublic int getType()
getType
in interface ParameterBuffer
public void addArgument(int argumentType)
ParameterBuffer
addArgument
in interface ParameterBuffer
argumentType
- type of argument.public int getArgumentAsInt(int argumentType)
ParameterBuffer
getArgumentAsInt
in interface ParameterBuffer
argumentType
- type of argument to find.0
if nothing found.public java.lang.String getArgumentAsString(int argumentType)
ParameterBuffer
getArgumentAsString
in interface ParameterBuffer
argumentType
- type of argument to find.null
if nothing found.public boolean hasArgument(int argumentType)
ParameterBuffer
hasArgument
in interface ParameterBuffer
argumentType
- type of argument to find.true
if this buffer contains specified argument.public void removeArgument(int argumentType)
ParameterBuffer
removeArgument
in interface ParameterBuffer
argumentType
- type of argument to remove.public DatabaseParameterBuffer removeExtensionParams()
DatabaseParameterBufferExtension
removeExtensionParams
in interface DatabaseParameterBufferExtension
public java.util.Iterator<Parameter> iterator()
ParameterBuffer
It is safe to iterate over this iterator while modifying the parameter buffer. Changes will not be reflected in the iterator.
iterator
in interface java.lang.Iterable<Parameter>
iterator
in interface ParameterBuffer
public void writeArgumentsTo(java.io.OutputStream outputStream) throws java.io.IOException
ParameterBuffer
OutputStream
.writeArgumentsTo
in interface ParameterBuffer
outputStream
- The OutputStream
to write tojava.io.IOException
- Errors produced by the output stream during writespublic Xdrable toXdrable()
toXdrable
in interface ParameterBuffer
Xdrable
to write (and optionally read) this instance as Xdr.public byte[] toBytes()
ParameterBuffer
This byte array includes the extra header-bytes (if any), but does not include the type information
toBytes
in interface ParameterBuffer
ParameterBuffer.toBytesWithType()
public byte[] toBytesWithType()
ParameterBuffer
This byte array includes the type information and the extra header bytes (if any).
toBytesWithType
in interface ParameterBuffer
ParameterBuffer.toBytes()
public int size()
size
in interface ParameterBuffer
public void setUserName(java.lang.String userName)
public void setPassword(java.lang.String password)
public boolean equals(java.lang.Object obj)
equals
in interface javax.resource.spi.ConnectionRequestInfo
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface javax.resource.spi.ConnectionRequestInfo
hashCode
in class java.lang.Object
public ParameterTagMapping getTagMapping()
getTagMapping
in interface ConnectionParameterBuffer
public Encoding getDefaultEncoding()
getDefaultEncoding
in interface ConnectionParameterBuffer
Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.