INSTANCE - The type of object over which the execution will be made. This can be an interface.public class InstanceExecutionFactoryBuilder<INSTANCE> extends DefaultExecutionFactoryBuilder<InstanceExecutionFactoryBuilder<INSTANCE>> implements InstanceSupplierBuilderFactory<INSTANCE,InstanceExecutionFactoryBuilder<INSTANCE>>, InstanceRunnableBuilderFactory<INSTANCE,InstanceExecutionFactoryBuilder<INSTANCE>>
MyResult result = new InstanceExecutionFactoryBuilder(myInstance).execute(MyInstance::myMethod)
.withParam(param1)
.withParam(param2);
Where myInstance is an instance of the MyInstance class, myMethod is an instance method on it, param1 is the first
parameter on myMethod, param2 is the second (and last) parameter on myMethod and MyResult is the returning object of
myMethod. This means that that execution is the equivalent of doing:
MyResult result = myInstance.myMethod(param1, param2);
The advantage of doing this in this way is all the wrappers and listeners that we can add to the execution.| Constructor and Description |
|---|
InstanceExecutionFactoryBuilder(Supplier<INSTANCE> instanceSupplier)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Supplier<INSTANCE> |
getInstanceSupplier() |
buildExecutionFactory, withExceptionHandler, withExceptionHandler, withIgnoredExceptionType, withPostExecutionListener, withPostExecutionListener, withPreExecutionListener, withPreExecutionListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecute, execute, execute, execute, execute, execute, execute, execute, execute, execute, executeexecute, execute, execute, execute, execute, execute, execute, execute, execute, execute, executebuildExecutionFactory, withExceptionHandler, withExceptionHandler, withIgnoredExceptionType, withPostExecutionListener, withPostExecutionListener, withPreExecutionListener, withPreExecutionListenerpublic Supplier<INSTANCE> getInstanceSupplier()
getInstanceSupplier in interface InstanceRunnableBuilderFactory<INSTANCE,InstanceExecutionFactoryBuilder<INSTANCE>>getInstanceSupplier in interface InstanceSupplierBuilderFactory<INSTANCE,InstanceExecutionFactoryBuilder<INSTANCE>>Copyright © 2019. All rights reserved.