01: /**
02: * EasyBeans
03: * Copyright (C) 2007 Bull S.A.S.
04: * Contact: easybeans@ow2.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: *
21: * --------------------------------------------------------------------------
22: * $Id: EmptyLifeCycleCallBack.java 2157 2007-12-11 12:37:10Z loris $
23: * --------------------------------------------------------------------------
24: */package org.ow2.easybeans.container;
25:
26: import org.ow2.easybeans.api.EZBContainerCallbackInfo;
27: import org.ow2.easybeans.api.EZBContainerLifeCycleCallback;
28: import org.ow2.easybeans.api.LifeCycleCallbackException;
29: import org.ow2.easybeans.api.binding.EZBRef;
30:
31: /**
32: * Provide callbacks that do nothing.
33: * @author WEI Zhouyue & ZHU Ning & BOUZONNET Loris
34: */
35: public abstract class EmptyLifeCycleCallBack implements
36: EZBContainerLifeCycleCallback {
37:
38: /**
39: * Called when container is starting.
40: * @param info some information on the container which is starting.
41: * @throws LifeCycleCallbackException if the invocation of the callback failed
42: */
43: public void start(final EZBContainerCallbackInfo info)
44: throws LifeCycleCallbackException {
45: // Do nothing
46: }
47:
48: /**
49: * Called when container is stopping.
50: * @param info some information on the container which is stopping.
51: * @throws LifeCycleCallbackException if the invocation of the callback failed
52: */
53: public void stop(final EZBContainerCallbackInfo info)
54: throws LifeCycleCallbackException {
55: // Do nothing
56: }
57:
58: /**
59: * Called before binding a reference into the registry.
60: * @param info some information on the container which is running.
61: * @param reference a reference on the bean that will be bound
62: * @throws LifeCycleCallbackException if the invocation of the callback failed
63: */
64: public void beforeBind(final EZBContainerCallbackInfo info,
65: final EZBRef reference) throws LifeCycleCallbackException {
66: // Do nothing
67: }
68:
69: }
|