Interface Wrapped

All Known Subinterfaces:
ConnectionProvider, MultiTenantConnectionProvider<T>
All Known Implementing Classes:
AbstractDataSourceBasedMultiTenantConnectionProviderImpl, AbstractMultiTenantConnectionProvider, AgroalConnectionProvider, C3P0ConnectionProvider, ConnectionProviderDelegate, DataSourceBasedMultiTenantConnectionProviderImpl, DatasourceConnectionProviderImpl, DriverManagerConnectionProviderImpl, HikariCPConnectionProvider, JtaAwareConnectionProviderImpl, PreparedStatementSpyConnectionProvider, ProxoolConnectionProvider, SharedDriverManagerConnectionProviderImpl, SQLServerSnapshotIsolationConnectionProvider, TimeZoneConnectionProvider, UserSuppliedConnectionProviderImpl, ViburDBCPConnectionProvider

public interface Wrapped
Optional contract for services that wrap stuff that to which it is useful to have access.

For example, a service that maintains a DataSource might want to expose access to the DataSource or its Connection instances.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isUnwrappableAs(Class<?> unwrapType)
    Can this wrapped service be unwrapped as the indicated type?
    <T> T
    unwrap(Class<T> unwrapType)
    Unproxy the service proxy
  • Method Details

    • isUnwrappableAs

      boolean isUnwrappableAs(Class<?> unwrapType)
      Can this wrapped service be unwrapped as the indicated type?
      Parameters:
      unwrapType - The type to check.
      Returns:
      True/false.
    • unwrap

      <T> T unwrap(Class<T> unwrapType)
      Unproxy the service proxy
      Parameters:
      unwrapType - The java type as which to unwrap this instance.
      Returns:
      The unwrapped reference
      Throws:
      UnknownUnwrapTypeException - if the service cannot be unwrapped as the indicated type