1 /* 2 * $Id: Entry.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 Entry 17 { 18 19 /** 20 * Name of this entry 21 * 22 * @return 23 */ 24 String getName(); 25 26 void setName(String name); 27 28 /** 29 * Retrieves the installation directory. 30 * 31 * @return the installation directory 32 */ 33 String getInstallRoot(); 34 35 /** 36 * Sets the installation directory. 37 * 38 * @param installRoot the installation directory 39 */ 40 void setInstallRoot(String installRoot); 41 42 /** 43 * Get the current state of this managed compononent. 44 * 45 * @return the current state of this managed component (must be one of the string 46 * constants defined by this interface) 47 */ 48 String getCurrentState(); 49 50 /** 51 * Status before JBI was shutdown. 52 * 53 * @return 54 */ 55 String getStateAtShutdown(); 56 57 /** 58 * Set the state before the server was shutdown. 59 * 60 * @param state 61 */ 62 void setStateAtShutdown(String state) throws RegistryException; 63 64 void setCurrentState(String state) throws RegistryException; 65 66 /** Value returned by {@link #getCurrentState()} for a shutdown component. */ 67 final static String SHUTDOWN = "Shutdown"; 68 69 /** Value returned by {@link #getCurrentState()} for a stopped component. */ 70 final static String STOPPED = "Stopped"; 71 72 /** Value returned by {@link #getCurrentState()} for a running component. */ 73 final static String RUNNING = "Running"; 74 75 /** 76 * Value returned by {@link #getCurrentState()} for a component in an unknown 77 * state. 78 */ 79 final static String UNKNOWN = "Unknown"; 80 81 /** 82 * Value returned by {@link #getCurrentState()} for a component in an initialised 83 * state. 84 */ 85 final static String INITIALIZED = "Initialized"; 86 87 }