blob: 2c751a14376816c13024cf362015341d0d83e8aa [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 *
26 * @param step subject step
27 */
28 default void onStart(Step step) {
29 }
30
31 /**
32 * Indicates that process step has completed.
33 *
34 * @param step subject step
35 * @param exitCode step process exit exitCode
36 */
37 default void onCompletion(Step step, int exitCode) {
38 }
39
40 /**
41 * Notifies when a new line of output becomes available.
42 *
43 * @param step subject step
44 * @param line line of output
45 */
46 default void onOutput(Step step, String line) {
47 }
48
49}