01: /*****************************************************************************
02: * Copyright (c) PicoContainer Organization. All rights reserved. *
03: * ------------------------------------------------------------------------- *
04: * The software in this package is published under the terms of the BSD *
05: * style license a copy of which has been included with this distribution in *
06: * the license.html file. *
07: * *
08: * Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant *
09: *****************************************************************************/package org.picocontainer;
10:
11: /**
12: * An interface which is implemented by components that need to dispose of resources during the shutdown of that
13: * component. The {@link Disposable#dispose()} must be called once during shutdown, directly after {@link
14: * Startable#stop()} (if the component implements the {@link Startable} interface).
15: * @see org.picocontainer.Startable the Startable interface if you need to <code>start()</code> and
16: * <code>stop()</code> semantics.
17: * @see org.picocontainer.PicoContainer the main PicoContainer interface (and hence its subinterfaces and
18: * implementations like {@link DefaultPicoContainer}) implement this interface.
19: */
20: public interface Disposable {
21: /**
22: * Dispose this component. The component should deallocate all resources. The contract for this method defines a
23: * single call at the end of this component's life.
24: */
25: void dispose();
26: }
|