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.Closeable
A 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 interface
Plugin.Engine.Dispatcher.Factory
A factory that is used for creating a dispatcher that is used for a specific plugin engine application.static class
Plugin.Engine.Dispatcher.ForParallelTransformation
A dispatcher that applies transformations within one or more threads in parallel to the default transformer.static class
Plugin.Engine.Dispatcher.ForSerialTransformation
A dispatcher that applies transformation upon discovery.static interface
Plugin.Engine.Dispatcher.Materializable
The 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 void
accept(java.util.concurrent.Callable<? extends java.util.concurrent.Callable<? extends Plugin.Engine.Dispatcher.Materializable>> work, boolean eager)
Accepts a new work assignment.void
complete()
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
-true
if 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.IOException
Completes the work being handled.- Throws:
java.io.IOException
- If an I/O exception occurs.
-
-