001 package com.hammurapi.flow.runtime;
002
003 import com.hammurapi.config.bootstrap.ConfigurationException;
004
005 /**
006 * Runtime flow element.
007 * @author Pavel Vlasov
008 *
009 */
010 public interface FlowElement {
011
012 /**
013 * This method is invoked after property injection, but before connecting flow elements.
014 * Flow elements can perform initialization of internal structures which are required for
015 * connecting elements, e.g. synapse factory.
016 * Flows are responsible for invoking beforeConnect() of their
017 * children in their beforeConnect().
018 * @throws ConfigurationException
019 */
020 void beforeConnect() throws ConfigurationException;
021
022 /**
023 * This method is invoked after all flow elements
024 * has been connected. Flow elements can perform initialization
025 * of internal structures in this method as well as in init() method.
026 * Flows are responsible for invoking afterConnect() of their
027 * children in their afterConnect().
028 * @throws ConfigurationException
029 */
030 void afterConnect() throws ConfigurationException;
031 }