View Javadoc

1   /*
2    * $Id: Unit.java 7976 2007-08-21 14:26:13Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.registry;
12  
13  /**
14   * @author <a href="mailto:gnt@codehaus.org">Guillaume Nodet</a>
15   */
16  public interface Unit extends Entry
17  {
18  
19      void init() throws RegistryException;
20  
21      /**
22       * Start the item.
23       * 
24       * @exception RegistryException if the item fails to start.
25       */
26      void start() throws RegistryException;
27  
28      /**
29       * Stop the item. This suspends current messaging activities.
30       * 
31       * @exception RegistryException if the item fails to stop.
32       */
33      void stop() throws RegistryException;
34  
35      /**
36       * Shut down the item. The releases resources, preparatory to uninstallation.
37       * 
38       * @exception RegistryException
39       */
40      void shutDown() throws RegistryException;
41  
42      RegistryComponent getRegistryComponent();
43  
44      void setRegistryComponent(RegistryComponent component);
45  
46      Assembly getAssembly();
47  
48      void setAssembly(Assembly assembly);
49  
50      String deploy() throws RegistryException;
51  
52      String undeploy() throws RegistryException;
53  
54  }