1 /* 2 * $Id: RegistryLifecycleHelpers.java 19191 2010-08-25 21:05:23Z tcarlson $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.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 package org.mule.api.lifecycle; 11 12 /** 13 * This interface defines additional Registry Lifecycle methods to enable extenral objects to have there 14 * lifecycle managed by the registry. 15 * 16 * @since 3.0 17 */ 18 public interface RegistryLifecycleHelpers 19 { 20 /** 21 * Applies lifecycle phase to an object independent of the current lifecycle phase. All phases between the current 22 * phase and the 'endPhase' will be executed. 23 * @param object the object to apply lifecycle to 24 * @param fromPhase the lifecycle phase the object is currently in. Must not be null. 25 * @param toPhase the lifecycle phase to transition the object to. Must not be null. 26 * @throws org.mule.api.lifecycle.LifecycleException if there is an exception while invoking lifecycle on the object 27 */ 28 void applyPhase(Object object, String fromPhase, String toPhase) throws LifecycleException; 29 30 /** 31 * Successively applies all completed lifecycle phase to an object. 32 * 33 * @param object the object to which the lifecycle should be applied 34 * @throws org.mule.api.lifecycle.LifecycleException if there is an error while applying lifecycle to the object 35 */ 36 void applyCompletedPhases(Object object) throws LifecycleException; 37 }