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.component.servlet; 018 019 import org.apache.camel.component.http.CamelServlet; 020 import org.apache.camel.component.http.HttpConsumer; 021 022 /** 023 * Keeps track of HttpConsumers and CamelServlets and 024 * connects them to each other. In OSGi there should 025 * be one HttpRegistry per bundle. 026 * 027 * A CamelServlet that should serve more than one 028 * bundle should be registered as an OSGi service. 029 * The HttpRegistryImpl can then be configured to listen 030 * to service changes. See /tests/camel-itest-osgi/../servlet 031 * for an example how to use this. 032 */ 033 public interface HttpRegistry { 034 035 void register(HttpConsumer consumer); 036 037 void unregister(HttpConsumer consumer); 038 039 void register(CamelServlet provider); 040 041 void unregister(CamelServlet provider); 042 043 }