Package org.int4.dirk.spi.config
Interface ProxyStrategy
-
- All Known Implementing Classes:
ByteBuddyProxyStrategy,NoProxyStrategy
public interface ProxyStrategyA strategy that determines how to create proxies.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceProxyStrategy.InstanceSupplier<T>Supplies instances that are wrapped by a proxy.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> java.util.function.Function<ProxyStrategy.InstanceSupplier<T>,T>createProxyFactory(java.lang.Class<T> cls)Creates a proxy factory for the givenClassand returns a function which can be used to create a new proxy.
-
-
-
Method Detail
-
createProxyFactory
<T> java.util.function.Function<ProxyStrategy.InstanceSupplier<T>,T> createProxyFactory(java.lang.Class<T> cls) throws java.lang.Exception
Creates a proxy factory for the givenClassand returns a function which can be used to create a new proxy.- Type Parameters:
T- the class type to proxy- Parameters:
cls- aClassto proxy, cannot benull- Returns:
- a function which can be used to create a new proxy, never
null - Throws:
java.lang.Exception- when unable to create a proxy factory, including when the functionality is disabled, the given class is unsuitable or an error occurred during proxy factory creation
-
-