Class LoggingHandler
- java.lang.Object
-
- org.apache.sling.scripting.sightly.impl.compiler.debug.LoggingHandler
-
- All Implemented Interfaces:
CommandHandler
public final class LoggingHandler extends Object implements CommandHandler
Handler which logs all commands
-
-
Field Summary
Fields Modifier and Type Field Description static LoggingHandlerINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonDone()This method is called when the stream has been closed.voidonEmit(Command command)Allows this handler to process theCommandthat was just written into the stream to which this handler was attached.voidonError(String errorMessage)Allows this handler to process error states.
-
-
-
Field Detail
-
INSTANCE
public static final LoggingHandler INSTANCE
-
-
Method Detail
-
onEmit
public void onEmit(Command command)
Description copied from interface:CommandHandlerAllows this handler to process theCommandthat was just written into the stream to which this handler was attached.- Specified by:
onEmitin interfaceCommandHandler- Parameters:
command- the received command
-
onError
public void onError(String errorMessage)
Description copied from interface:CommandHandlerAllows this handler to process error states.- Specified by:
onErrorin interfaceCommandHandler- Parameters:
errorMessage- the error's message
-
onDone
public void onDone()
Description copied from interface:CommandHandlerThis method is called when the stream has been closed. The contract is that after this call, no other commands or errors will be emitted.- Specified by:
onDonein interfaceCommandHandler
-
-