/*
 * Copyright (C) 1999-2006 <a href="mailto:paschke@in.tum.de">Adrian Paschke</a>
 * 
 * The ECA Interpreter is part of the Rule Based Service Level Agreement (RBSLA)
 * framework, available at 
 * <a href=" http://ibis.in.tum.de/staff/paschke/rbsla/index.htm">RBSLA</a>
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package rbsla.eca;

import java.util.Map;

import org.mandarax.kernel.ResultSet;

import org.apache.log4j.Logger;

import rbsla.wrapper.KnowledgeBaseWrapper;
import ws.prova.reference.ProvaResultSetImpl2;

/**
 * Used to define System time events like onShutdown. Something like a placeholder.
 * Evaluates always get false back.
 * 
 * @author <A HREF="mailto:paschke@in.tum.de">Adrian Paschke</A>
 * @version 0.1 <1 Sept 2005>
 * @since 0.1
 */
class SystemTime implements Time
{
    static public final int onShutdown = 0;

    static public final int onStartup = 1;

    static public final int onDelay = 2;

    static public final int onTimeout = 3;

    static public final int onSystemError = 4;

    private int type;

    private static Logger logger = Logger.getLogger(SystemTime.class);

    public SystemTime(int _type)
    {
        type = _type;

    }
	
	public void replace(Map vars) {}
	
	public Object clone() {
		return new SystemTime(type);
	}

    public int getType()
    {
        return type;
    }

    public ResultSet evaluate(KnowledgeBaseWrapper prova)
    {
        return new ProvaResultSetImpl2();
    }

    public String toXML(int intend)
    {
        return null;
    }

}