public final class ConnectionUnwrapper extends Object
PGConnection).
It might be used to access some methods exclusive for some DBMS connections.
| Modifier and Type | Method and Description |
|---|---|
static Optional<Connection> |
tryUnwrapConnection(Connection origin)
Try to extract the most nested connection from the possible wrapped passed connection
origin. |
@Nonnull public static Optional<Connection> tryUnwrapConnection(@Nonnull Connection origin)
origin. Since
the task is impossible to solve in general case (it depends on implementation of Connection), this method
provides only best effort guarantees and doesn't guarantee any particular result (there's no clear definition of
success). Please check the return value and handle the errors gracefully.Optional.empty() if we couldn't extract anything
at all.Copyright © 2020 Atlassian. All rights reserved.