Package org.int4.dirk.extensions.proxy
Class ByteBuddyProxyStrategy
- java.lang.Object
-
- org.int4.dirk.extensions.proxy.ByteBuddyProxyStrategy
-
- All Implemented Interfaces:
ProxyStrategy
public class ByteBuddyProxyStrategy extends java.lang.Object implements ProxyStrategy
An implementation ofProxyStrategywhich uses Byte Buddy to implement the proxy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classByteBuddyProxyStrategy.InterceptorInterceptor class to call the underlying delegate object when the proxy is accessed.-
Nested classes/interfaces inherited from interface org.int4.dirk.spi.config.ProxyStrategy
ProxyStrategy.InstanceSupplier<T>
-
-
Constructor Summary
Constructors Constructor Description ByteBuddyProxyStrategy()
-
Method Summary
All Methods Instance Methods Concrete 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
public <T> java.util.function.Function<ProxyStrategy.InstanceSupplier<T>,T> createProxyFactory(java.lang.Class<T> cls) throws java.lang.Exception
Description copied from interface:ProxyStrategyCreates a proxy factory for the givenClassand returns a function which can be used to create a new proxy.- Specified by:
createProxyFactoryin interfaceProxyStrategy- 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
-
-