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