KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > component > common > su > ServiceUnitListener


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2006 EBM Websourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id$
20  * -------------------------------------------------------------------------
21  */

22
23 package org.objectweb.petals.component.common.su;
24
25 import org.objectweb.petals.component.common.PEtALSComponentSDKException;
26 import org.objectweb.petals.tools.jbicommon.descriptor.JBIDescriptor;
27
28 /**
29  * This interface defines callback methods for ServiceUnit management. <br>
30  * It takes place in the PEtALS abstract S.E. or Binding component framework. <br>
31  * A <code>ServiceUnitHandler</code> object is set on the component using the
32  * <code>setServiceUnitHandler()</code> method. <br>
33  * This callback is not mandatory, but it gives extra management during the
34  * Service Units life cycle.
35  *
36  * @author alouis - EBM Websourcing
37  *
38  */

39 public interface ServiceUnitListener {
40
41     /**
42      * Callback after a ServiceUnit has been deployed
43      *
44      * @param serviceUnitName
45      * @param suRootPath
46      * @param descriptor
47      */

48     void onSUDeployed(final String JavaDoc serviceUnitName, final String JavaDoc suRootPath,
49         final JBIDescriptor descriptor) throws PEtALSComponentSDKException;
50
51     /**
52      * Callback after a ServiceUnit has been started
53      *
54      * @param serviceUnitName
55      */

56     void onSUStarted(final String JavaDoc serviceUnitName) throws PEtALSComponentSDKException;
57
58     /**
59      * Callback after a ServiceUnit has been stopped
60      *
61      * @param serviceUnitName
62      */

63     void onSUStopped(final String JavaDoc serviceUnitName) throws PEtALSComponentSDKException;
64
65     /**
66      * Callback after a ServiceUnit has been undeployed
67      *
68      * @param serviceUnitName
69      * @param suRootPath
70      */

71     void onSUUndeployed(final String JavaDoc serviceUnitName, final String JavaDoc suRootPath,
72         final JBIDescriptor descriptor) throws PEtALSComponentSDKException;
73
74 }
75
Popular Tags