Package net.bytebuddy.build
Interface Plugin.Engine.Dispatcher
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
Plugin.Engine.Dispatcher.ForParallelTransformation,Plugin.Engine.Dispatcher.ForParallelTransformation.WithThrowawayExecutorService,Plugin.Engine.Dispatcher.ForSerialTransformation
- Enclosing interface:
- Plugin.Engine
public static interface Plugin.Engine.Dispatcher extends java.io.CloseableA dispatcher to execute a plugin engine transformation. A dispatcher will receive all work assignments prior to the invocation of complete. After registering and eventually completing the supplied work, the close method will always be called. Any dispatcher will only be used once and from a single thread.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfacePlugin.Engine.Dispatcher.FactoryA factory that is used for creating a dispatcher that is used for a specific plugin engine application.static classPlugin.Engine.Dispatcher.ForParallelTransformationA dispatcher that applies transformations within one or more threads in parallel to the default transformer.static classPlugin.Engine.Dispatcher.ForSerialTransformationA dispatcher that applies transformation upon discovery.static interfacePlugin.Engine.Dispatcher.MaterializableThe result of a work assignment that needs to be invoked from the main thread that triggers a dispatchers life-cycle methods.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaccept(java.util.concurrent.Callable<? extends java.util.concurrent.Callable<? extends Plugin.Engine.Dispatcher.Materializable>> work, boolean eager)Accepts a new work assignment.voidcomplete()Completes the work being handled.
-
-
-
Method Detail
-
accept
void accept(java.util.concurrent.Callable<? extends java.util.concurrent.Callable<? extends Plugin.Engine.Dispatcher.Materializable>> work, boolean eager) throws java.io.IOException
Accepts a new work assignment.- Parameters:
work- The work to handle prefixed by a preprocessing step.eager-trueif the processing does not need to be deferred until all preprocessing is complete.- Throws:
java.io.IOException- If an I/O exception occurs.
-
complete
void complete() throws java.io.IOExceptionCompletes the work being handled.- Throws:
java.io.IOException- If an I/O exception occurs.
-
-