KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > dyade > aaa > agent > EngineMBean


1 /*
2  * Copyright (C) 2001 - 2003 ScalAgent Distributed Technologies
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17  * USA.
18  */

19 package fr.dyade.aaa.agent;
20
21 public interface EngineMBean {
22   /**
23    * Returns this <code>Engine</code>'s name.
24    *
25    * @return this <code>Engine</code>'s name.
26    */

27   public String JavaDoc getName();
28
29   /**
30    * Returns the maximum number of agents loaded in memory.
31    *
32    * @return the maximum number of agents loaded in memory
33    */

34   public int getNbMaxAgents();
35
36   /**
37    * Returns the number of agents actually loaded in memory.
38    *
39    * @return the maximum number of agents actually loaded in memory
40    */

41   public int getNbAgents();
42
43   /**
44    * Tests if the engine is alive.
45    *
46    * @return true if this <code>MessageConsumer</code> is alive; false
47    * otherwise.
48    */

49   public boolean isRunning();
50
51   /**
52    * Returns the number of agent's reaction since last boot.
53    *
54    * @return the number of agent's reaction since last boot
55    */

56   public long getNbReactions();
57
58   /**
59    * Gets the number of messages posted to this engine since creation.
60    *
61    * return the number of messages.
62    */

63   public int getNbMessages();
64
65   /**
66    * Gets the number of waiting messages in this engine.
67    *
68    * return the number of waiting messages.
69    */

70   public int getNbWaitingMessages();
71
72   /**
73    * Returns the number of fixed agents.
74    *
75    * @return the number of fixed agents
76    */

77   public int getNbFixedAgents();
78
79   /**
80    * Sets the maximum number of agents that can be loaded simultaneously
81    * in memory.
82    *
83    * @param NbMaxAgents the maximum number of agents
84    */

85   public void setNbMaxAgents(int NbMaxAgents);
86
87   public String JavaDoc dumpAgent(String JavaDoc id) throws Exception JavaDoc;
88
89   /**
90    * Returns a string representation of this engine.
91    *
92    * @return A string representation of this engine.
93    */

94   public String JavaDoc toString();
95
96   /** Causes this engine to begin execution */
97   public void start() throws Exception JavaDoc;
98
99   /** Forces the engine to stop executing */
100   public void stop();
101 }
102
Popular Tags