Class VisitorHandler
java.lang.Object
org.apache.sling.scripting.sightly.impl.compiler.util.stream.VisitorHandler
- All Implemented Interfaces:
CommandHandler
Delegates commands to a visitor.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
VisitorHandler
-
-
Method Details
-
onEmit
Description copied from interface:CommandHandler
Allows this handler to process theCommand
that was just written into the stream to which this handler was attached.- Specified by:
onEmit
in interfaceCommandHandler
- Parameters:
command
- the received command
-
onError
Description copied from interface:CommandHandler
Allows this handler to process error states.- Specified by:
onError
in interfaceCommandHandler
- Parameters:
errorMessage
- the error's message
-
onDone
public void onDone()Description copied from interface:CommandHandler
This 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:
onDone
in interfaceCommandHandler
-