Examples of SuspendableService


Examples of org.apache.camel.SuspendableService

     * @throws Exception is thrown if error occurred
     * @see #stopService(Object)
     */
    public static boolean suspendService(Service service) throws Exception {
        if (service instanceof SuspendableService) {
            SuspendableService ss = (SuspendableService) service;
            if (!ss.isSuspended()) {
                LOG.trace("Suspending service {}", service);
                ss.suspend();
                return true;
            } else {
                return false;
            }
        } else {
View Full Code Here

Examples of org.apache.camel.SuspendableService

        return service instanceof SuspendableService;
    }

    public boolean isSuspended() {
        if (service instanceof SuspendableService) {
            SuspendableService ss = (SuspendableService) service;
            return ss.isSuspended();
        } else {
            return false;
        }
    }
View Full Code Here

Examples of org.apache.camel.SuspendableService

    public void suspend() throws Exception {
        if (!context.getStatus().isStarted()) {
            throw new IllegalArgumentException("CamelContext is not started");
        }
        if (service instanceof SuspendableService) {
            SuspendableService ss = (SuspendableService) service;
            ss.suspend();
        } else {
            throw new UnsupportedOperationException("suspend() is not a supported operation");
        }
    }
View Full Code Here

Examples of org.apache.camel.SuspendableService

    public void resume() throws Exception {
        if (!context.getStatus().isStarted()) {
            throw new IllegalArgumentException("CamelContext is not started");
        }
        if (service instanceof SuspendableService) {
            SuspendableService ss = (SuspendableService) service;
            ss.resume();
        } else {
            throw new UnsupportedOperationException("resume() is not a supported operation");
        }
    }
View Full Code Here

Examples of org.apache.camel.SuspendableService

     * <tt>false</tt> if the service is already in the desired state.
     * @throws Exception is thrown if error occurred
     */
    public static boolean resumeService(Service service) throws Exception {
        if (service instanceof SuspendableService) {
            SuspendableService ss = (SuspendableService) service;
            if (ss.isSuspended()) {
                LOG.debug("Resuming service {}", service);
                ss.resume();
                return true;
            } else {
                return false;
            }
        } else {
View Full Code Here

Examples of org.apache.camel.SuspendableService

     * <tt>false</tt> if the service is already in the desired state.
     * @throws Exception is thrown if error occurred
     */
    public static boolean suspendService(Service service) throws Exception {
        if (service instanceof SuspendableService) {
            SuspendableService ss = (SuspendableService) service;
            if (!ss.isSuspended()) {
                LOG.trace("Suspending service {}", service);
                ss.suspend();
                return true;
            } else {
                return false;
            }
        } else {
View Full Code Here

Examples of org.apache.camel.SuspendableService

     * <tt>false</tt> if the service is already in the desired state.
     * @throws Exception is thrown if error occurred
     */
    public static boolean resumeService(Service service) throws Exception {
        if (service instanceof SuspendableService) {
            SuspendableService ss = (SuspendableService) service;
            if (ss.isSuspended()) {
                LOG.debug("Resuming service {}", service);
                ss.resume();
                return true;
            } else {
                return false;
            }
        } else {
View Full Code Here

Examples of org.apache.camel.SuspendableService

     * <tt>false</tt> if the service is already in the desired state.
     * @throws Exception is thrown if error occurred
     */
    public static boolean suspendService(Service service) throws Exception {
        if (service instanceof SuspendableService) {
            SuspendableService ss = (SuspendableService) service;
            if (!ss.isSuspended()) {
                LOG.trace("Suspending service {}", service);
                ss.suspend();
                return true;
            } else {
                return false;
            }
        } else {
View Full Code Here

Examples of org.apache.camel.SuspendableService

     * @throws Exception is thrown if error occurred
     * @see #startService(Service)
     */
    public static boolean resumeService(Service service) throws Exception {
        if (service instanceof SuspendableService) {
            SuspendableService ss = (SuspendableService) service;
            if (ss.isSuspended()) {
                LOG.debug("Resuming service {}", service);
                ss.resume();
                return true;
            } else {
                return false;
            }
        } else {
View Full Code Here

Examples of org.apache.camel.SuspendableService

     * @throws Exception is thrown if error occurred
     * @see #stopService(Object)
     */
    public static boolean suspendService(Service service) throws Exception {
        if (service instanceof SuspendableService) {
            SuspendableService ss = (SuspendableService) service;
            if (!ss.isSuspended()) {
                LOG.trace("Suspending service {}", service);
                ss.suspend();
                return true;
            } else {
                return false;
            }
        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.