com.github.davidmoten.rx.jdbc.ConnectionProviderNonClosing Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxjava-jdbc Show documentation
Show all versions of rxjava-jdbc Show documentation
rx-java Observables for jdbc
package com.github.davidmoten.rx.jdbc;
import java.sql.Connection;
/**
* Wraps a single {@link Connection} so that calls to {@link Connection#close()}
* are ignored.
*/
final class ConnectionProviderNonClosing implements ConnectionProvider {
private final Connection con;
/**
* Constructor.
*
* @param con
*/
public ConnectionProviderNonClosing(Connection con) {
this.con = con;
}
@Override
public Connection get() {
return new ConnectionNonClosing(con);
}
@Override
public void close() {
// do nothing
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy