Package org.mokai

Examples of org.mokai.Configurable


   * @throws ExecutionException if the configure method throws an exception.
   */
  public static void configure(Object object) throws ExecutionException {
    try {
      if (Configurable.class.isInstance(object)) {
        Configurable configurable = (Configurable) object;
        configurable.configure();
      }
    } catch (Exception e) {
      throw new ExecutionException("Exception while configuring object: " + e.getMessage(), e);
    }
  }
View Full Code Here


   * @throws ExecutionException the the destroy method throws an exception.
   */
  public static void destroy(Object object) throws ExecutionException {
    try {
      if (Configurable.class.isInstance(object)) {
        Configurable configurable = (Configurable) object;
        configurable.destroy();
      }
    } catch (Exception e) {
      throw new ExecutionException("Exception while destroying object: " + e.getMessage(), e);
    }
  }
View Full Code Here

  @Override
  public void configure() throws Exception {
    for (Processor processor : processors) {
      if (Configurable.class.isInstance(processor)) {
        Configurable configurable = (Configurable) processor;
        configurable.configure();
      }
    }
  }
View Full Code Here

  @Override
  public void destroy() throws Exception {
    for (Processor processor : processors) {
      if (Configurable.class.isInstance(processor)) {
        Configurable configurable = (Configurable) processor;
        configurable.destroy();
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.mokai.Configurable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.