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    package org.apache.oozie.event.listener;
019    
020    import org.apache.hadoop.conf.Configuration;
021    import org.apache.oozie.event.BundleJobEvent;
022    import org.apache.oozie.event.CoordinatorActionEvent;
023    import org.apache.oozie.event.CoordinatorJobEvent;
024    import org.apache.oozie.event.WorkflowActionEvent;
025    import org.apache.oozie.event.WorkflowJobEvent;
026    
027    /**
028     * Event listener for Job notification events, defining methods corresponding to
029     * job status changes
030     */
031    public abstract class JobEventListener {
032    
033        /**
034         * Initialize the listener
035         * @param conf
036         */
037        public abstract void init(Configuration conf);
038    
039        /**
040         * Destroy the listener
041         */
042        public abstract void destroy();
043    
044        /**
045         * On workflow job transition
046         * @param WorkflowJobEvent
047         */
048        public abstract void onWorkflowJobEvent(WorkflowJobEvent wje);
049    
050        /**
051         * On workflow action transition
052         * @param WorkflowActionEvent
053         */
054        public abstract void onWorkflowActionEvent(WorkflowActionEvent wae);
055    
056        /**
057         * On coordinator job transition
058         * @param CoordinatorJobEvent
059         */
060        public abstract void onCoordinatorJobEvent(CoordinatorJobEvent cje);
061    
062        /**
063         * On coordinator action transition
064         * @param CoordinatorActionEvent
065         */
066        public abstract void onCoordinatorActionEvent(CoordinatorActionEvent cae);
067    
068        /**
069         * On bundle job transition
070         * @param BundleJobEvent
071         */
072        public abstract void onBundleJobEvent(BundleJobEvent bje);
073    
074    }