Search in sources :

Example 1 with ExecutionListener

use of henplus.event.ExecutionListener in project henplus by neurolabs.

the class SetCommand method registerLastCommandListener.

public void registerLastCommandListener(final CommandDispatcher dispatcher) {
    _specialVariables.add(SPECIAL_LAST_COMMAND);
    dispatcher.addExecutionListener(new ExecutionListener() {

        @Override
        public void beforeExecution(final SQLSession session, final String command) {
        }

        @Override
        public void afterExecution(final SQLSession session, final String command, final int result) {
            setVariable(SPECIAL_LAST_COMMAND, command.trim());
        }
    });
}
Also used : SQLSession(henplus.SQLSession) ExecutionListener(henplus.event.ExecutionListener)

Aggregations

SQLSession (henplus.SQLSession)1 ExecutionListener (henplus.event.ExecutionListener)1