/*
 * JOnAS: Java(TM) Open Application Server
 * Copyright (C) 1999 Bull S.A.
 * Contact: jonas-team@objectweb.org
 * 
 * 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.1 of the License, or 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
 *
 * --------------------------------------------------------------------------
 * $Id$
 * --------------------------------------------------------------------------
 */

// Simple.java

package org.objectweb.jonas.jtests.beans.transacted;

import java.rmi.RemoteException;
import javax.ejb.EJBObject;
import javax.ejb.TimerHandle;

/**
 * This interface is implemented by different types of beans (EB,SL)
 */
public interface Simple extends EJBObject {
    // every method returns true if called inside a tx, false if not.
    public boolean opwith_notsupported() throws RemoteException;// TX_NOT_SUPPORTED
    public boolean opwith_requires_new() throws RemoteException;// TX_REQUIRES_NEW
    public boolean opwith_required() throws RemoteException; 	// TX_REQUIRED
    public boolean opwith_mandatory() throws RemoteException; 	// TX_MANDATORY
    public boolean opwith_supports() throws RemoteException; 	// TX_SUPPORTS
    public boolean supports_call_required() throws RemoteException; 	// TX_SUPPORTS
    public boolean opwith_never() throws RemoteException;      	// TX_NEVER
    public boolean required_call_requires_new() throws RemoteException; 	// TX_REQUIRED
    public boolean call_requires_new_on(Simple other) throws RemoteException; 	// TX_REQUIRED
    public int setTimer(int dur, int period) throws RemoteException;
    public int setTimer(java.util.Date date, int period) throws RemoteException;
    public int setTimerGetHandle(int dur, int period) throws RemoteException;
    public void cancelTimer(int id) throws RemoteException;
    public void cancelTimers() throws RemoteException;
    public long getTimeRemaining(int id) throws RemoteException;
    public int getTimerCount() throws RemoteException;
    public int getTimerNumber() throws RemoteException;
    public TimerHandle getTimerHandle(int id) throws RemoteException;
    public void startInfoTimer(int dur, String inform) throws RemoteException;     // TX_REQUIRED
}
