001/** 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019package org.apache.oozie.event.listener; 020 021import org.apache.hadoop.conf.Configuration; 022import org.apache.oozie.event.BundleJobEvent; 023import org.apache.oozie.event.CoordinatorActionEvent; 024import org.apache.oozie.event.CoordinatorJobEvent; 025import org.apache.oozie.event.WorkflowActionEvent; 026import org.apache.oozie.event.WorkflowJobEvent; 027 028/** 029 * Event listener for Job notification events, defining methods corresponding to 030 * job status changes 031 */ 032public abstract class JobEventListener { 033 034 /** 035 * Initialize the listener 036 * @param conf 037 */ 038 public abstract void init(Configuration conf); 039 040 /** 041 * Destroy the listener 042 */ 043 public abstract void destroy(); 044 045 /** 046 * On workflow job transition 047 * @param wje 048 */ 049 public abstract void onWorkflowJobEvent(WorkflowJobEvent wje); 050 051 /** 052 * On workflow action transition 053 * @param wae 054 */ 055 public abstract void onWorkflowActionEvent(WorkflowActionEvent wae); 056 057 /** 058 * On coordinator job transition 059 * @param cje 060 */ 061 public abstract void onCoordinatorJobEvent(CoordinatorJobEvent cje); 062 063 /** 064 * On coordinator action transition 065 * @param cae 066 */ 067 public abstract void onCoordinatorActionEvent(CoordinatorActionEvent cae); 068 069 /** 070 * On bundle job transition 071 * @param bje 072 */ 073 public abstract void onBundleJobEvent(BundleJobEvent bje); 074 075}