View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.registry;
8   
9   import org.mule.api.MuleContext;
10  import org.mule.api.MuleException;
11  import org.mule.api.context.MuleContextAware;
12  import org.mule.api.lifecycle.InitialisationException;
13  import org.mule.api.lifecycle.Lifecycle;
14  
15  import java.util.ArrayList;
16  import java.util.List;
17  
18  /**
19   * TODO
20   */
21  public abstract class AbstractLifecycleTracker implements Lifecycle,
22          MuleContextAware
23  {
24  
25      private final List<String> tracker = new ArrayList<String>();
26  
27      public List<String> getTracker() {
28          return tracker;
29      }
30  
31      public void setProperty(final String value) {
32          tracker.add("setProperty");
33      }
34  
35      public void setMuleContext(final MuleContext context) {
36          tracker.add("setMuleContext");
37      }
38  
39      public void initialise() throws InitialisationException
40      {
41          tracker.add("initialise");
42      }
43  
44      public void start() throws MuleException
45      {
46          tracker.add("start");
47      }
48  
49      public void stop() throws MuleException {
50          tracker.add("stop");
51      }
52  
53      public void dispose() {
54          tracker.add("dispose");
55      }
56  
57  }