Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
JOnAS: Java(TM) Open Application Server Copyright (C) 2009 Bull S.A.S. Contact: jonas-team@ow2.org This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -------------------------------------------------------------------------- $Id: ICamelService.java 19578 2010-03-31 08:28:32Z eyindanga $ --------------------------------------------------------------------------
 
 package org.ow2.jonas.camel.service.api;
 
 import java.util.List;
 
Interface of the Camel Service.

Author(s):
Guillaume Renault
 
 public interface ICamelService {

    
Get the names of Camel contexts managed by the service.

Returns:
Names of Camel contexts managed by the service.
 
     List<StringgetContextNames();

    
Start a new camel context and return context name.

Returns:
the camel context name.
Throws:
java.lang.Exception If starting the context fails.
 
     String startNewContext() throws Exception;

    
Start a new camel context and return context.

Returns:
the camel context.
Throws:
java.lang.Exception If starting the context fails.
 
     CamelContext startAndGetNewContext() throws Exception;

    
Stop an instance of Camel.

Parameters:
name the camel context name to stop.
Throws:
java.lang.Exception If stopping any CAMEL console fails.
 
     void stop(final String namethrows Exception;

    
Get an instance of Camel.

Parameters:
name the camel context name
Returns:
the camel context
 
     CamelContext getCamelContext(String name);

    
Add a org.apache.camel.Route to the given context, by providing a org.apache.camel.builder.RouteBuilder

Parameters:
builder the route builder.
camelContextName the camel context name on which the route has to be set.
Throws:
java.lang.Exception If adding route fails.
 
     void addRoutes(final RouteBuilder builderfinal String camelContextNamethrows Exception;

    
Get the list of existing routes.

Parameters:
camelContextName the identifier of the camel context to check.
Returns:
the list of existing routes for the given camel context..
 
    List<RouteDefinitiongetRouteDefinitions(final String camelContextName);

    
Get a producer template for the given camel context.

Parameters:
camelContextName the camel context name on which the producer has to be taken.
Returns:
the producer template.
    ProducerTemplate getProducerTemplate(final String camelContextName);

    
Add values to the registry component.

Parameters:
input the stream that contains the entries to add.
camelContextName the camel context name that contains the registry to update.
    void addRegistry(final InputStream inputfinal String camelContextNamethrows Exception;

    
Remove entries from the registry component.

Parameters:
input the input stream that contains all the entries to remove
camelContextName the camel context name to remove the entries on.
    void removeRegistry(final InputStream inputfinal String camelContextName);

    
Add a component on the given camel context.

Parameters:
componentName the component name.
component the component.
camelContextName the camel name context.
    void addComponent(final String componentNamefinal Component componentfinal String camelContextName);
New to GrepCode? Check out our FAQ X