Package io.vertx.db2client
Interface DB2Connection
-
- All Superinterfaces:
SqlClient
,SqlConnection
public interface DB2Connection extends SqlConnection
A connection to DB2 server.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static DB2Connection
cast(SqlConnection sqlConnection)
Cast aSqlConnection
toDB2Connection
.DB2Connection
closeHandler(Handler<Void> handler)
Set an handler called when the connection is closed.static Future<DB2Connection>
connect(Vertx vertx, DB2ConnectOptions connectOptions)
Create a connection to DB2 server with the givenconnectOptions
.static Future<DB2Connection>
connect(Vertx vertx, String connectionUri)
Likeconnect(Vertx, DB2ConnectOptions)
with options build fromconnectionUri
.Future<Void>
debug()
Send a DEBUG command to dump debug information to the server's stdout.DB2Connection
exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.Future<Void>
ping()
Send a PING command to check if the server is alive.-
Methods inherited from interface io.vertx.sqlclient.SqlClient
close, preparedQuery, preparedQuery, query
-
Methods inherited from interface io.vertx.sqlclient.SqlConnection
begin, databaseMetadata, isSSL, prepare, prepare, transaction
-
-
-
-
Method Detail
-
connect
static Future<DB2Connection> connect(Vertx vertx, DB2ConnectOptions connectOptions)
Create a connection to DB2 server with the givenconnectOptions
.- Parameters:
vertx
- the vertx instanceconnectOptions
- the options for the connection- Returns:
- a future notified with the connection or the failure
-
connect
static Future<DB2Connection> connect(Vertx vertx, String connectionUri)
Likeconnect(Vertx, DB2ConnectOptions)
with options build fromconnectionUri
.
-
exceptionHandler
DB2Connection exceptionHandler(Handler<Throwable> handler)
Description copied from interface:SqlConnection
Set an handler called with connection errors.- Specified by:
exceptionHandler
in interfaceSqlConnection
- Parameters:
handler
- the handler- Returns:
- a reference to this, so the API can be used fluently
-
closeHandler
DB2Connection closeHandler(Handler<Void> handler)
Description copied from interface:SqlConnection
Set an handler called when the connection is closed.- Specified by:
closeHandler
in interfaceSqlConnection
- Parameters:
handler
- the handler- Returns:
- a reference to this, so the API can be used fluently
-
ping
Future<Void> ping()
Send a PING command to check if the server is alive.- Returns:
- a future notified with the server response
-
debug
Future<Void> debug()
Send a DEBUG command to dump debug information to the server's stdout.- Returns:
- a future notified with the execution result
-
cast
static DB2Connection cast(SqlConnection sqlConnection)
Cast aSqlConnection
toDB2Connection
. This is mostly useful for Vert.x generated APIs like RxJava/Mutiny.- Parameters:
sqlConnection
- the connection to cast- Returns:
- a
instance
-
-