public interface FbAttachment extends java.lang.AutoCloseable, ExceptionListenable
All methods defined in this interface and the direct descendants FbDatabase
and FbService
are
required to notify all SQLException
thrown from the methods defined in this interface, and those exceptions
notified by all ExceptionListenable
implementations created from them.
Modifier and Type | Method and Description |
---|---|
void |
attach()
Attach to the attachment type.
|
void |
close()
Detaches and closes the connection.
|
void |
forceClose()
Forces the connection to close without proper detach or cleanup.
|
DatatypeCoder |
getDatatypeCoder() |
Encoding |
getEncoding() |
IEncodingFactory |
getEncodingFactory() |
int |
getHandle() |
int |
getNetworkTimeout()
Gets the current network timeout for this attachment.
|
GDSServerVersion |
getServerVersion() |
java.lang.Object |
getSynchronizationObject()
Get synchronization object.
|
boolean |
isAttached()
Current attachment status.
|
void |
setNetworkTimeout(int milliseconds)
Sets the network timeout for this attachment.
|
addExceptionListener, removeExceptionListener
void attach() throws java.sql.SQLException
java.sql.SQLException
void close() throws java.sql.SQLException
close
in interface java.lang.AutoCloseable
java.sql.SQLException
- If not currently connected, or another problem occurred detaching.void forceClose() throws java.sql.SQLException
If a given implementation does not support this, then this method should call close()
.
java.sql.SQLException
- For problems closing the connection.int getHandle()
GDSServerVersion getServerVersion()
boolean isAttached()
true
if connected to the server and attached to a database or service, false
otherwise.java.lang.Object getSynchronizationObject()
null
.IEncodingFactory getEncodingFactory()
IEncodingFactory
for this connectionEncoding getEncoding()
IEncodingFactory.getDefaultEncoding()
on the result of getEncodingFactory()
.DatatypeCoder getDatatypeCoder()
DatatypeCoder
for this database implementation.void setNetworkTimeout(int milliseconds) throws java.sql.SQLException
milliseconds
- Timeout in milliseconds; 0 means no timeout. If the attachment doesn't support milliseconds, it should
round up to the nearest second.java.sql.SQLException
- If this attachment is closed, the value of milliseconds
is smaller than 0, or if setting the
timeout fails.java.sql.SQLFeatureNotSupportedException
- If this attachment doesn't support (changing) the network timeout.int getNetworkTimeout() throws java.sql.SQLException
java.sql.SQLException
- If this attachment is closedjava.sql.SQLFeatureNotSupportedException
- If this attachment doesn't support network timeoutCopyright © 2001-2020 Jaybird (Firebird JDBC/JCA) team. All rights reserved.