Class CamundaClientProxy
java.lang.Object
io.camunda.zeebe.spring.test.proxy.AbstractInvocationHandler
io.camunda.zeebe.spring.test.proxy.CamundaClientProxy
- All Implemented Interfaces:
InvocationHandler
Dynamic proxy to delegate to a
CamundaClient which allows to swap the CamundaClient
object under the hood. This is used in test environments, where the Zeebe engine is
re-initialized for every test case.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjecthandleInvocation(Object proxy, Method method, @Nullable Object[] args) AbstractInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])delegates to this method upon any method invocation on the proxy instance, exceptObject.equals(java.lang.Object),Object.hashCode()andObject.toString().voidvoidswapZeebeClient(io.camunda.client.CamundaClient client) Methods inherited from class io.camunda.zeebe.spring.test.proxy.AbstractInvocationHandler
equals, hashCode, invoke, toString
-
Constructor Details
-
CamundaClientProxy
public CamundaClientProxy()
-
-
Method Details
-
swapZeebeClient
public void swapZeebeClient(io.camunda.client.CamundaClient client) -
removeCamundaClient
public void removeCamundaClient() -
handleInvocation
protected Object handleInvocation(Object proxy, Method method, @Nullable Object[] args) throws Throwable Description copied from class:AbstractInvocationHandlerAbstractInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])delegates to this method upon any method invocation on the proxy instance, exceptObject.equals(java.lang.Object),Object.hashCode()andObject.toString(). The result will be returned as the proxied method's return value.Unlike
AbstractInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]),argswill never be null. When the method has no parameter, an empty array is passed in.- Specified by:
handleInvocationin classAbstractInvocationHandler- Throws:
Throwable
-