Package cn.sliew.milky.common.chain
Class LogCommand
- java.lang.Object
-
- cn.sliew.milky.common.chain.LogCommand
-
-
Constructor Summary
Constructors Constructor Description LogCommand(Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexceptionCaught(AbstractPipelineProcess<String,Object> process, Context<String,Object> context, CompletableFuture<?> future, Throwable cause)Gets called if aThrowablewas thrown.voidonEvent(AbstractPipelineProcess<String,Object> process, Context<String,Object> context, CompletableFuture<?> future)Execute a unit of processing work to be performed.
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LogCommand
public LogCommand(Logger logger)
-
-
Method Detail
-
onEvent
public void onEvent(AbstractPipelineProcess<String,Object> process, Context<String,Object> context, CompletableFuture<?> future)
Description copied from interface:CommandExecute a unit of processing work to be performed.A command may either complete the required processing and just return or call async future, or delegate remaining processing to the subsequent command in the enclosing
Pipelineby continue fire event.
-
exceptionCaught
public void exceptionCaught(AbstractPipelineProcess<String,Object> process, Context<String,Object> context, CompletableFuture<?> future, Throwable cause) throws PipelineException
Description copied from interface:CommandGets called if aThrowablewas thrown.- Specified by:
exceptionCaughtin interfaceCommand<String,Object>- Throws:
PipelineException
-
-