001    /**
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.camel;
018    
019    import java.util.List;
020    import java.util.Map;
021    
022    public interface Route {
023    
024        String ID_PROPERTY = "id";
025        String PARENT_PROPERTY = "parent";
026        String GROUP_PROPERTY = "group";
027    
028        /**
029         * Gets the inbound endpoint
030         */
031        Endpoint getEndpoint();
032    
033        /**
034         * Sets the inbound endpoint
035         *
036         * @param endpoint the endpoint
037         */
038        void setEndpoint(Endpoint endpoint);
039    
040        /**
041         * This property map is used to associate information about the route.
042         *
043         * @return properties
044         */
045        Map<String, Object> getProperties();
046    
047        /**
048         * This property map is used to associate information about
049         * the route. Gets all tbe services for this routes
050         *
051         * @return the services
052         * @throws Exception is thrown in case of error
053         */
054        List<Service> getServicesForRoute() throws Exception;
055    
056        /**
057         * Returns the additional services required for this particular route
058         */
059        List<Service> getServices();
060    
061        /**
062         * Sets the sources for this route
063         *
064         * @param services the services
065         */
066        void setServices(List<Service> services);
067    
068        /**
069         * Adds a service to this route
070         *
071         * @param service the service
072         */
073        void addService(Service service);
074    
075        /**
076         * Returns a navigator to navigate this route by navigating all the {@link Processor}s.
077         *
078         * @return a navigator for {@link Processor}.
079         */
080        Navigate<Processor> navigate();
081    
082    }