Package io.vertx.reactivex.db2client
Class DB2Connection
- java.lang.Object
-
- io.vertx.reactivex.sqlclient.SqlClient
-
- io.vertx.reactivex.sqlclient.SqlConnection
-
- io.vertx.reactivex.db2client.DB2Connection
-
public class DB2Connection extends SqlConnection
A connection to DB2 server. NOTE: This class has been automatically generated from theoriginalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<DB2Connection>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description DB2Connection(DB2Connection delegate)DB2Connection(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DB2Connectioncast(SqlConnection sqlConnection)Cast a toDB2Connection.DB2ConnectioncloseHandler(Handler<Void> handler)Set an handler called when the connection is closed.static voidconnect(Vertx vertx, DB2ConnectOptions connectOptions)Create a connection to DB2 server with the givenconnectOptions.static voidconnect(Vertx vertx, DB2ConnectOptions connectOptions, Handler<AsyncResult<DB2Connection>> handler)Create a connection to DB2 server with the givenconnectOptions.static voidconnect(Vertx vertx, String connectionUri)Likeconnect(io.vertx.reactivex.core.Vertx, io.vertx.db2client.DB2ConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.db2client.DB2Connection>>)with options build fromconnectionUri.static voidconnect(Vertx vertx, String connectionUri, Handler<AsyncResult<DB2Connection>> handler)Likeconnect(io.vertx.reactivex.core.Vertx, io.vertx.db2client.DB2ConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.db2client.DB2Connection>>)with options build fromconnectionUri.DB2Connectiondebug()Send a DEBUG command to dump debug information to the server's stdout.DB2Connectiondebug(Handler<AsyncResult<Void>> handler)Send a DEBUG command to dump debug information to the server's stdout.booleanequals(Object o)DB2ConnectionexceptionHandler(Handler<Throwable> handler)Set an handler called with connection errors.DB2ConnectiongetDelegate()inthashCode()static DB2ConnectionnewInstance(DB2Connection arg)DB2Connectionping()Send a PING command to check if the server is alive.DB2Connectionping(Handler<AsyncResult<Void>> handler)Send a PING command to check if the server is alive.DB2Connectionprepare(String sql)Create a prepared statement using the givensqlstring.DB2Connectionprepare(String sql, Handler<AsyncResult<PreparedStatement>> handler)Create a prepared statement using the givensqlstring.static io.reactivex.Single<DB2Connection>rxConnect(Vertx vertx, DB2ConnectOptions connectOptions)Create a connection to DB2 server with the givenconnectOptions.static io.reactivex.Single<DB2Connection>rxConnect(Vertx vertx, String connectionUri)Likeconnect(io.vertx.reactivex.core.Vertx, io.vertx.db2client.DB2ConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.db2client.DB2Connection>>)with options build fromconnectionUri.io.reactivex.CompletablerxDebug()Send a DEBUG command to dump debug information to the server's stdout.io.reactivex.CompletablerxPing()Send a PING command to check if the server is alive.io.reactivex.Single<PreparedStatement>rxPrepare(String sql)Create a prepared statement using the givensqlstring.StringtoString()-
Methods inherited from class io.vertx.reactivex.sqlclient.SqlConnection
begin, begin, close, close, databaseMetadata, isSSL, newInstance, prepare, prepare, rxBegin, rxClose, rxPrepare, transaction
-
Methods inherited from class io.vertx.reactivex.sqlclient.SqlClient
newInstance, preparedQuery, preparedQuery, query
-
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<DB2Connection> __TYPE_ARG
-
-
Constructor Detail
-
DB2Connection
public DB2Connection(DB2Connection delegate)
-
DB2Connection
public DB2Connection(Object delegate)
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toStringin classSqlConnection
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classSqlConnection
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSqlConnection
-
getDelegate
public DB2Connection getDelegate()
- Overrides:
getDelegatein classSqlConnection
-
connect
public static void connect(Vertx vertx, DB2ConnectOptions connectOptions, Handler<AsyncResult<DB2Connection>> handler)
Create a connection to DB2 server with the givenconnectOptions.- Parameters:
vertx- the vertx instanceconnectOptions- the options for the connectionhandler- the handler called with the connection or the failure
-
connect
public static void connect(Vertx vertx, DB2ConnectOptions connectOptions)
Create a connection to DB2 server with the givenconnectOptions.- Parameters:
vertx- the vertx instanceconnectOptions- the options for the connection
-
rxConnect
public static io.reactivex.Single<DB2Connection> rxConnect(Vertx vertx, DB2ConnectOptions connectOptions)
Create a connection to DB2 server with the givenconnectOptions.- Parameters:
vertx- the vertx instanceconnectOptions- the options for the connection- Returns:
-
connect
public static void connect(Vertx vertx, String connectionUri, Handler<AsyncResult<DB2Connection>> handler)
Likeconnect(io.vertx.reactivex.core.Vertx, io.vertx.db2client.DB2ConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.db2client.DB2Connection>>)with options build fromconnectionUri.- Parameters:
vertx-connectionUri-handler-
-
connect
public static void connect(Vertx vertx, String connectionUri)
Likeconnect(io.vertx.reactivex.core.Vertx, io.vertx.db2client.DB2ConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.db2client.DB2Connection>>)with options build fromconnectionUri.- Parameters:
vertx-connectionUri-
-
rxConnect
public static io.reactivex.Single<DB2Connection> rxConnect(Vertx vertx, String connectionUri)
Likeconnect(io.vertx.reactivex.core.Vertx, io.vertx.db2client.DB2ConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.db2client.DB2Connection>>)with options build fromconnectionUri.- Parameters:
vertx-connectionUri-- Returns:
-
prepare
public DB2Connection prepare(String sql, Handler<AsyncResult<PreparedStatement>> handler)
Description copied from class:SqlConnectionCreate a prepared statement using the givensqlstring.- Overrides:
preparein classSqlConnection- Parameters:
sql- the sqlhandler- the handler notified with the prepared query asynchronously- Returns:
-
prepare
public DB2Connection prepare(String sql)
Description copied from class:SqlConnectionCreate a prepared statement using the givensqlstring.- Overrides:
preparein classSqlConnection- Parameters:
sql- the sql- Returns:
-
rxPrepare
public io.reactivex.Single<PreparedStatement> rxPrepare(String sql)
Description copied from class:SqlConnectionCreate a prepared statement using the givensqlstring.- Overrides:
rxPreparein classSqlConnection- Parameters:
sql- the sql- Returns:
-
exceptionHandler
public DB2Connection exceptionHandler(Handler<Throwable> handler)
Description copied from class:SqlConnectionSet an handler called with connection errors.- Overrides:
exceptionHandlerin classSqlConnection- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
closeHandler
public DB2Connection closeHandler(Handler<Void> handler)
Description copied from class:SqlConnectionSet an handler called when the connection is closed.- Overrides:
closeHandlerin classSqlConnection- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
ping
public DB2Connection ping(Handler<AsyncResult<Void>> handler)
Send a PING command to check if the server is alive.- Parameters:
handler- the handler notified when the server responses to client- Returns:
- a reference to this, so the API can be used fluently
-
ping
public DB2Connection ping()
Send a PING command to check if the server is alive.- Returns:
- a reference to this, so the API can be used fluently
-
rxPing
public io.reactivex.Completable rxPing()
Send a PING command to check if the server is alive.- Returns:
- a reference to this, so the API can be used fluently
-
debug
public DB2Connection debug(Handler<AsyncResult<Void>> handler)
Send a DEBUG command to dump debug information to the server's stdout.- Parameters:
handler- the handler notified with the execution result- Returns:
- a reference to this, so the API can be used fluently
-
debug
public DB2Connection debug()
Send a DEBUG command to dump debug information to the server's stdout.- Returns:
- a reference to this, so the API can be used fluently
-
rxDebug
public io.reactivex.Completable rxDebug()
Send a DEBUG command to dump debug information to the server's stdout.- Returns:
- a reference to this, so the API can be used fluently
-
cast
public static DB2Connection cast(SqlConnection sqlConnection)
Cast a toDB2Connection. This is mostly useful for Vert.x generated APIs like RxJava/Mutiny.- Parameters:
sqlConnection- the connection to cast- Returns:
- a
instance
-
newInstance
public static DB2Connection newInstance(DB2Connection arg)
-
-