View Javadoc

1   /*
2    * $Id: LifecycleTrackerComponentObject.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.lifecycle;
12  
13  import org.mule.api.MuleEventContext;
14  import org.mule.api.lifecycle.Callable;
15  import org.mule.api.service.Service;
16  import org.mule.api.service.ServiceAware;
17  
18  /**
19   * @author David Dossot (david@dossot.net)
20   */
21  public class LifecycleTrackerComponentObject extends AbstractLifecycleTracker
22          implements ServiceAware, Callable {
23  
24      public void springInitialize() {
25          getTracker().add("springInitialize");
26      }
27  
28      public void springDestroy() {
29          getTracker().add("springDestroy");
30      }
31  
32       public void setService(final Service service)
33      {
34          getTracker().add("setService");
35      }
36  
37      public Object onCall(final MuleEventContext eventContext) throws Exception {
38          // dirty trick to get the component instance that was used for the
39          // request
40          return this;
41      }
42  
43  }