KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > api > internal > limitagent > LimitAgentManager


1 package org.enhydra.shark.api.internal.limitagent;
2
3 import java.util.Map JavaDoc;
4 import org.enhydra.shark.api.RootException;
5 import org.enhydra.shark.api.SharkTransaction;
6 import org.enhydra.shark.api.internal.working.CallbackUtilities;
7
8 /**
9  * @author <a HREF="mailto:jaz@ofbiz.org">Andy Zeneski</a>
10  * @since Mar 24, 2004
11  */

12 public interface LimitAgentManager {
13
14    /**
15     * Method configure is called at Shark start up, to configure
16     * implementation of LimitAgent.
17     *
18     * @param cus an instance of CallbackUtilities used to get
19     * properties for configuring.
20     *
21     * @exception RootException Thrown if configuring doesn't succeed.
22     */

23    void configure(CallbackUtilities cus) throws RootException;
24
25    /**
26     * Method checkLimits.
27     *
28     * @exception LimitAgentException.
29     */

30    void checkLimits (SharkTransaction t) throws LimitAgentException;
31
32    void checkLimits (SharkTransaction t,String JavaDoc procId) throws LimitAgentException;
33
34    void checkProcessLimit (SharkTransaction t,String JavaDoc procId) throws LimitAgentException;
35
36    void checkActivityLimit (SharkTransaction t,String JavaDoc procId,String JavaDoc actId) throws LimitAgentException;
37
38    /**
39     * Method notifyStart
40     *
41     * @param procId a String.
42     * @param actId a String.
43     * @param context a Map.
44     * @param runtime a long.
45     *
46     * @exception LimitAgentException.
47     */

48    void notifyStart(String JavaDoc procId, String JavaDoc actId, Map JavaDoc context, long runtime) throws LimitAgentException;
49
50    /**
51     * Method notifyStop.
52     *
53     * @param procId a String.
54     * @param actId a String.
55     *
56     * @exception LimitAgentException.
57     */

58    void notifyStop(String JavaDoc procId, String JavaDoc actId) throws LimitAgentException;
59 }
60
Popular Tags