Package org.hibernate.service.spi
Interface Wrapped
-
- All Known Subinterfaces:
ConnectionProvider,MultiTenantConnectionProvider
- All Known Implementing Classes:
AbstractDataSourceBasedMultiTenantConnectionProviderImpl,AbstractMultiTenantConnectionProvider,ConnectionProviderDelegate,DataSourceBasedMultiTenantConnectionProviderImpl,org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl,JtaAwareConnectionProviderImpl,SharedDriverManagerConnectionProviderImpl,SQLServerSnapshotIsolationConnectionProvider
public interface WrappedOptional contract for services that wrap stuff that to which it is useful to have access. For example, a service that maintains aDataSourcemight want to expose access to theDataSourceor itsConnectioninstances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisUnwrappableAs(java.lang.Class unwrapType)Can this wrapped service be unwrapped as the indicated type?<T> Tunwrap(java.lang.Class<T> unwrapType)Unproxy the service proxy
-
-
-
Method Detail
-
isUnwrappableAs
boolean isUnwrappableAs(java.lang.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(java.lang.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
-
-