public class PgConnectionImpl extends SqlConnectionImpl<PgConnectionImpl> implements PgConnection
conn, context| Constructor and Description |
|---|
PgConnectionImpl(io.vertx.pgclient.impl.PgConnectionFactory factory,
Context context,
Connection conn) |
| Modifier and Type | Method and Description |
|---|---|
PgConnection |
cancelRequest(Handler<AsyncResult<Void>> handler)
Send a request cancellation message to tell the server to cancel processing request in this connection.
|
static void |
connect(Vertx vertx,
PgConnectOptions options,
Handler<AsyncResult<PgConnection>> handler)
Connects to the database and returns the connection if that succeeds.
|
void |
handleNotification(int processId,
String channel,
String payload) |
PgConnection |
notificationHandler(Handler<PgNotification> handler)
Set an handler called when the connection receives notification on a channel.
|
int |
processId() |
int |
secretKey() |
begin, begin, close, closeHandler, exceptionHandler, handleClosed, handleException, isSSL, schedule, schedulepreparepreparedBatch, preparedBatch, preparedQuery, preparedQuery, preparedQuery, preparedQuery, query, queryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseHandler, connect, connect, exceptionHandler, prepare, preparedBatch, preparedBatch, preparedQuery, preparedQuery, preparedQuery, preparedQuery, query, querybegin, close, isSSLpublic PgConnectionImpl(io.vertx.pgclient.impl.PgConnectionFactory factory,
Context context,
Connection conn)
public static void connect(Vertx vertx, PgConnectOptions options, Handler<AsyncResult<PgConnection>> handler)
PgConnectionconnect in interface PgConnectionvertx - the vertx instanceoptions - the connect optionshandler - the handler called with the connection or the failurepublic PgConnection notificationHandler(Handler<PgNotification> handler)
PgConnectionPgNotification and has access to the channel name
and the notification payload.notificationHandler in interface PgConnectionhandler - the handlerpublic void handleNotification(int processId,
String channel,
String payload)
handleNotification in interface Connection.HolderhandleNotification in class SqlConnectionImpl<PgConnectionImpl>public int processId()
processId in interface PgConnectionpublic int secretKey()
secretKey in interface PgConnectionpublic PgConnection cancelRequest(Handler<AsyncResult<Void>> handler)
PgConnectioncancelRequest in interface PgConnectionhandler - the handler notified if cancelling request is sentCopyright © 2020. All rights reserved.