Package org.mokai

Examples of org.mokai.ExecutionException


      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


      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

      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

      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

          && field.getType().isInstance(resource)) {
        field.setAccessible(true);
        try {
          field.set(object, resource);
        } catch (Exception e) {
          throw new ExecutionException(e);
        }
      }
    }
  }
View Full Code Here

        log.warn("Couldn't register Routing Engine JMX MBean: " + e.getMessage(), e);
      }

      log.info("<< Mokai is ready >>");
    } catch (Exception e) {
      throw new ExecutionException(e);
    }

  }
View Full Code Here

        } catch (CamelExecutionException e) {
          Throwable ex = e;
          if (e.getCause() != null) {
            ex = e.getCause();
          }
          throw new ExecutionException(ex);
        }
      }

    };
View Full Code Here

        initInboundRoutes();
      } else {
        startInboundRoutes();
      }
    } catch (Exception e) {
      throw new ExecutionException(e);
    }

    // start the connector if is Serviceable
    LifecycleMethodsHelper.start(connector);

    // we need to start the outbound routes after starting the connector
    try {
      if (outboundRoutes == null) {
        initOutboundRoutes();
      } else {
        startOutboundRoutes();
      }
    } catch (Exception e) {
      throw new ExecutionException(e);
    }

    state = State.STARTED;

    if (changeListener != null) {
View Full Code Here

      List<RouteDefinition> reversedOutboundRoutes = reverse(outboundRoutes);
      for (RouteDefinition route : reversedOutboundRoutes) {
        camelContext.stopRoute(route.getId());
      }
    } catch (Exception e) {
      throw new ExecutionException(e);
    }

    // stop the processor if it implements Configurable
    LifecycleMethodsHelper.stop(connector);

    // stop the inbound routes after stopping the connector
    try {
      for (RouteDefinition route : inboundRoutes) {
        camelContext.stopRoute(route.getId());
      }
    } catch (Exception e) {
      throw new ExecutionException(e);
    }

    state = State.STOPPED;

    if (changeListener != null) {
View Full Code Here

        return valueOfMethod.invoke(null, value.toString());
      } catch (InvocationTargetException e) {
        if (e.getCause() != null && RuntimeException.class.isInstance(e.getCause())) {
          throw (RuntimeException) e.getCause();
        } else {
          throw new ExecutionException(e);
        }
      }
    }

    return value;
View Full Code Here

TOP

Related Classes of org.mokai.ExecutionException

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.