Package org.mokai

Examples of org.mokai.Serviceable


   */
  public static void start(Object object) throws ExecutionException {
    try {
      // start the object if it implements Serviceable
      if (Serviceable.class.isInstance(object)) {
        Serviceable connectorService = (Serviceable) object;
        connectorService.doStart();
      }
    } catch (Exception e) {
      throw new ExecutionException("Exception while starting object: " + e.getMessage(), e);
    }
  }
View Full Code Here


   */
  public static void stop(Object object) throws ExecutionException {
    try {
      // stop the object if it implements Serviceable
      if (Serviceable.class.isInstance(object)) {
        Serviceable connectorService = (Serviceable) object;
        connectorService.doStop();
      }
    } catch (Exception e) {
      throw new ExecutionException("Exception while stopping object: " + e.getMessage(), e);
    }
  }
View Full Code Here

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

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

TOP

Related Classes of org.mokai.Serviceable

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.