blob: a8222d0b2598ec4832f9488ec349c9513675e4e2 [file] [log] [blame]
Thomas Vachuskaf9c84362015-04-15 11:20:45 -07001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onlab.stc;
17
18/**
19 * Entity capable of receiving notifications of process step execution events.
20 */
21public interface StepProcessListener {
22
23 /**
24 * Indicates that process step has started.
25 *
Thomas Vachuskab51b8bc2015-07-27 08:37:12 -070026 * @param step subject step
27 * @param command actual command executed; includes run-time substitutions
Thomas Vachuskaf9c84362015-04-15 11:20:45 -070028 */
Thomas Vachuskab51b8bc2015-07-27 08:37:12 -070029 default void onStart(Step step, String command) {
Thomas Vachuskaf9c84362015-04-15 11:20:45 -070030 }
31
32 /**
33 * Indicates that process step has completed.
34 *
Thomas Vachuska86439372015-06-05 09:21:32 -070035 * @param step subject step
36 * @param status step completion status
Thomas Vachuskaf9c84362015-04-15 11:20:45 -070037 */
Thomas Vachuska86439372015-06-05 09:21:32 -070038 default void onCompletion(Step step, Coordinator.Status status) {
Thomas Vachuskaf9c84362015-04-15 11:20:45 -070039 }
40
41 /**
42 * Notifies when a new line of output becomes available.
43 *
44 * @param step subject step
45 * @param line line of output
46 */
47 default void onOutput(Step step, String line) {
48 }
49
50}