1   /*
2    * $Id: TestAgent.java 11517 2008-03-31 21:34:19Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.tck.testmodels.mule;
12  
13  import org.mule.api.MuleException;
14  import org.mule.api.agent.Agent;
15  import org.mule.api.lifecycle.InitialisationException;
16  
17  import java.util.Collections;
18  import java.util.List;
19  
20  /**
21   * Mock agent
22   */
23  public class TestAgent implements Agent
24  {
25  
26      private String frobbit;
27  
28      public String getName()
29      {
30          return "Test Agent";
31      }
32  
33      public void setName(String name)
34      {
35          // nothing to do
36      }
37  
38      public String getDescription()
39      {
40          return "Test JMX Agent";
41      }
42  
43      public void initialise() throws InitialisationException
44      {
45          // nothing to do
46      }
47  
48      public void start() throws MuleException
49      {
50          // nothing to do
51      }
52  
53      public void stop() throws MuleException
54      {
55          // nothing to do
56      }
57  
58      public void dispose()
59      {
60          // nothing to do
61      }
62  
63      public void registered()
64      {
65          // nothing to do
66      }
67  
68      public void unregistered()
69      {
70          // nothing to do
71      }
72  
73      public List getDependentAgents()
74      {
75          return Collections.EMPTY_LIST;
76      }
77  
78      public String getFrobbit()
79      {
80          return frobbit;
81      }
82  
83      public void setFrobbit(String frobbit)
84      {
85          this.frobbit = frobbit;
86      }
87  }