Module com.microsoft.gctoolkit.api
Class JVMEventDispatcher
- java.lang.Object
-
- com.microsoft.gctoolkit.aggregator.JVMEventDispatcher
-
public class JVMEventDispatcher extends Object
This is a utility class that supports theAggregator.register(Class, Consumer)method.
-
-
Constructor Summary
Constructors Constructor Description JVMEventDispatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R extends JVMEvent>
voiddispatch(R event)todo: fix comment for the link below.<R extends JVMEvent>
voidregister(Class<R> eventClass, Consumer<? super R> process)Called fromAggregator.register(Class, Consumer)
-
-
-
Method Detail
-
register
public <R extends JVMEvent> void register(Class<R> eventClass, Consumer<? super R> process)
Called fromAggregator.register(Class, Consumer)- Type Parameters:
R- A type of JVMEvent- Parameters:
eventClass- A JVMEvent class that the Aggregator capturesprocess- A method to call back when an event of typeeventClassis captured.
-
dispatch
public <R extends JVMEvent> void dispatch(R event)
todo: fix comment for the link below. Called fromAggregator.receive(JVMEvent), this invokes the process method that wasregistered.- Type Parameters:
R- the type of JVMEvent.- Parameters:
event- An event from the parser.
-
-