@HashCodeAndEqualsPlugin.Enhance public static class AgentBuilder.RedefinitionStrategy.Listener.StreamWriting extends Object implements AgentBuilder.RedefinitionStrategy.Listener
PrintStream.AgentBuilder.RedefinitionStrategy.Listener.Adapter, AgentBuilder.RedefinitionStrategy.Listener.BatchReallocator, AgentBuilder.RedefinitionStrategy.Listener.Compound, AgentBuilder.RedefinitionStrategy.Listener.ErrorEscalating, AgentBuilder.RedefinitionStrategy.Listener.NoOp, AgentBuilder.RedefinitionStrategy.Listener.Pausing, AgentBuilder.RedefinitionStrategy.Listener.StreamWriting, AgentBuilder.RedefinitionStrategy.Listener.Yielding| Constructor and Description |
|---|
StreamWriting(PrintStream printStream)
Creates a new stream writing listener.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onBatch(int index,
List<Class<?>> batch,
List<Class<?>> types)
Invoked before applying a batch.
|
void |
onComplete(int amount,
List<Class<?>> types,
Map<List<Class<?>>,Throwable> failures)
Invoked upon completion of all batches.
|
Iterable<? extends List<Class<?>>> |
onError(int index,
List<Class<?>> batch,
Throwable throwable,
List<Class<?>> types)
Invoked upon an error during a batch.
|
static AgentBuilder.RedefinitionStrategy.Listener |
toSystemError()
Writes the stream result to
System.err. |
static AgentBuilder.RedefinitionStrategy.Listener |
toSystemOut()
Writes the stream result to
System.out. |
public StreamWriting(PrintStream printStream)
printStream - The print stream to write any events to.public static AgentBuilder.RedefinitionStrategy.Listener toSystemOut()
System.out.public static AgentBuilder.RedefinitionStrategy.Listener toSystemError()
System.err.public void onBatch(int index,
List<Class<?>> batch,
List<Class<?>> types)
onBatch in interface AgentBuilder.RedefinitionStrategy.Listenerindex - A running index of the batch starting at 0.batch - The types included in this batch.types - All types included in the redefinition.public Iterable<? extends List<Class<?>>> onError(int index, List<Class<?>> batch, Throwable throwable, List<Class<?>> types)
onError in interface AgentBuilder.RedefinitionStrategy.Listenerindex - A running index of the batch starting at 0.batch - The types included in this batch.throwable - The throwable that caused this invocation.types - All types included in the redefinition.batch but not all classes.public void onComplete(int amount,
List<Class<?>> types,
Map<List<Class<?>>,Throwable> failures)
onComplete in interface AgentBuilder.RedefinitionStrategy.Listeneramount - The total amount of batches that were executed.types - All types included in the redefinition.failures - A mapping of batch types to their unhandled failures.Copyright © 2014–2019. All rights reserved.