View Javadoc

1   /*
2    * $Id: AbstractLifecycleTracker.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  package org.mule.registry;
11  
12  import org.mule.api.MuleContext;
13  import org.mule.api.MuleException;
14  import org.mule.api.context.MuleContextAware;
15  import org.mule.api.lifecycle.InitialisationException;
16  import org.mule.api.lifecycle.Lifecycle;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  /**
22   * TODO
23   */
24  public abstract class AbstractLifecycleTracker implements Lifecycle,
25          MuleContextAware
26  {
27  
28      private final List<String> tracker = new ArrayList<String>();
29  
30      public List<String> getTracker() {
31          return tracker;
32      }
33  
34      public void setProperty(final String value) {
35          tracker.add("setProperty");
36      }
37  
38      public void setMuleContext(final MuleContext context) {
39          tracker.add("setMuleContext");
40      }
41  
42      public void initialise() throws InitialisationException
43      {
44          tracker.add("initialise");
45      }
46  
47      public void start() throws MuleException
48      {
49          tracker.add("start");
50      }
51  
52      public void stop() throws MuleException {
53          tracker.add("stop");
54      }
55  
56      public void dispose() {
57          tracker.add("dispose");
58      }
59  
60  }