001/*
002 * IzPack - Copyright 2001-2005 Julien Ponge, All Rights Reserved.
003 * 
004 * http://www.izforge.com/izpack/
005 * http://developer.berlios.de/projects/izpack/
006 * 
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 * You may obtain a copy of the License at
010 * 
011 *     http://www.apache.org/licenses/LICENSE-2.0
012 *     
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 */
019
020package com.izforge.izpack.compiler;
021
022/**
023 * An interface for classes that want to listen to a packager events.
024 * 
025 * @author Julien Ponge
026 */
027public interface PackagerListener
028{
029
030    /** Message priority of "debug". */
031    public static final int MSG_DEBUG = 0;
032
033    /** Message priority of "error". */
034    public static final int MSG_ERR = 1;
035
036    /** Message priority of "information". */
037    public static final int MSG_INFO = 2;
038
039    /** Message priority of "verbose". */
040    public static final int MSG_VERBOSE = 3;
041
042    /** Message priority of "warning". */
043    public static final int MSG_WARN = 4;
044
045    /**
046     * Send a message with the priority MSG_INFO.
047     * 
048     * @param info The information that has been sent.
049     */
050    public void packagerMsg(String info);
051
052    /**
053     * Send a message with the specified priority.
054     * 
055     * @param info The information that has been sent.
056     * @param priority The priority of the message.
057     */
058    public void packagerMsg(String info, int priority);
059
060    /** Called when the packager starts. */
061    public void packagerStart();
062
063    /** Called when the packager stops. */
064    public void packagerStop();
065}