1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.component.embed

File LifecycleHandler.java

 

Code metrics

0
0
0
1
45
8
0
-
-
0
-

Classes

Class Line # Actions
LifecycleHandler 32 0 - 0 0
-1.0 -
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.component.embed;
21   
22    import org.xwiki.component.descriptor.ComponentDescriptor;
23    import org.xwiki.component.manager.ComponentManager;
24   
25    /**
26    * A lifecycle handler is used when instantiating a Component and can perform operation to set up the component (for
27    * example if a component implements a given interface calls a method of that interface, etc).
28    *
29    * @version $Id: c880110c7d96ed6f3699ffacae76c5f0fab996a9 $
30    * @since 3.2RC1
31    */
 
32    public interface LifecycleHandler
33    {
34    /**
35    * Handle initialization of the passed component instance.
36    *
37    * @param instance the component instance to initialize
38    * @param descriptor the descriptor of the passed component
39    * @param componentManager the component manager which is initializing the Component
40    * @param <T> the type of the Component
41    * @throws Exception in case the handler fails to handle the Component initialization
42    */
43    <T> void handle(T instance, ComponentDescriptor<T> descriptor, ComponentManager componentManager)
44    throws Exception;
45    }