| 1 | // jademx - JADE management using JMX |
| 2 | // Copyright 2004-2005 Caboodle Networks, Inc. |
| 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 (at your option) 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
| 17 | |
| 18 | package jade.jademx.unit; |
| 19 | |
| 20 | import jade.jademx.agent.JademxAgent; |
| 21 | |
| 22 | /** |
| 23 | * Agent to do nothing - similar to Unix redirection to /dev/null. |
| 24 | * Instantiate this agent if you want a placeholder for a given name but |
| 25 | * you don't want the agent to do anything. An example of this might |
| 26 | * be if the message to be injected into an agent group is to allegedly |
| 27 | * be from :sender foo, and you want a reply to be postable back to foo, |
| 28 | * but you don't want it to take any action on the reply. |
| 29 | * @author David Bernstein, <a href="http://www.caboodlenetworks.com" |
| 30 | * >Caboodle Networks, Inc.</a> |
| 31 | */ |
| 32 | public class NullAgent extends JademxAgent { |
| 33 | |
| 34 | /** |
| 35 | * make a null agent |
| 36 | */ |
| 37 | public NullAgent() { |
| 38 | super(); |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * initialize this agent. |
| 43 | */ |
| 44 | public void setup() { |
| 45 | // NOP |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * clean up this agent. |
| 50 | */ |
| 51 | public void takeDown() { |
| 52 | // NOP |
| 53 | } |
| 54 | |
| 55 | } |