BaseListener.java revision 959ffdf65f280ee90b7944a8dd610564e7f99e69
1/* 2 * Copyright (C) 2014 The Android Open Source Project 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 */ 16 17package dexfuzz.listeners; 18 19import dexfuzz.ExecutionResult; 20import dexfuzz.executors.Executor; 21import dexfuzz.program.Mutation; 22 23import java.util.List; 24import java.util.Map; 25 26/** 27 * Base class for Listeners, who are notified about certain events in dexfuzz's execution. 28 */ 29public abstract class BaseListener { 30 public void setup() { } 31 32 public void shutdown() { } 33 34 public void handleSuccessfulHostVerification() { } 35 36 public void handleFailedHostVerification(ExecutionResult verificationResult) { } 37 38 public void handleFailedTargetVerification() { } 39 40 public void handleIterationStarted(int iteration) { } 41 42 public void handleIterationFinished(int iteration) { } 43 44 public void handleTimeouts(List<Executor> timedOut, List<Executor> didNotTimeOut) { } 45 46 public void handleDivergences(Map<String, List<Executor>> outputMap) { } 47 48 public void handleFuzzingFile(String inputFile) { } 49 50 public void handleSeed(long seed) { } 51 52 public void handleHostVerificationSigabort(ExecutionResult verificationResult) { } 53 54 public void handleSuccess(Map<String, List<Executor>> outputMap) { } 55 56 public void handleDumpOutput(String outputLine, Executor executor) { } 57 58 public void handleDumpVerify(String verifyLine) { } 59 60 public void handleMutationStats(String statsString) { } 61 62 public void handleTiming(String name, float elapsedTime) { } 63 64 public void handleMutationFail() { } 65 66 public void handleSummary() { } 67 68 public void handleSuccessfullyFuzzedFile(String programName) { } 69 70 public void handleSelfDivergence() { } 71 72 public void handleMessage(String msg) { } 73 74 public void handleMutations(List<Mutation> mutations) { } 75 76 public void handleArchitectureSplit() { } 77} 78