View Javadoc

1   /*
2    * $Id: TestAgent.java 19191 2010-08-25 21:05:23Z tcarlson $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.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 List<Class<? extends Agent>> getDependentAgents()
64      {
65          return Collections.emptyList();
66      }
67  
68      public String getFrobbit()
69      {
70          return frobbit;
71      }
72  
73      public void setFrobbit(String frobbit)
74      {
75          this.frobbit = frobbit;
76      }
77  }