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.jetty;
018
019 import java.net.URI;
020 import java.net.URISyntaxException;
021 import java.util.List;
022
023 import org.apache.camel.Component;
024 import org.apache.camel.Consumer;
025 import org.apache.camel.PollingConsumer;
026 import org.apache.camel.Processor;
027 import org.apache.camel.Producer;
028 import org.apache.camel.component.http.HttpClientConfigurer;
029 import org.apache.camel.component.http.HttpConsumer;
030 import org.apache.camel.component.http.HttpEndpoint;
031 import org.apache.camel.component.http.HttpPollingConsumer;
032 import org.apache.commons.httpclient.HttpConnectionManager;
033 import org.apache.commons.httpclient.params.HttpClientParams;
034 import org.mortbay.jetty.Handler;
035
036 /**
037 * @version $Revision: 793361 $
038 */
039 public class JettyHttpEndpoint extends HttpEndpoint {
040
041 private boolean sessionSupport;
042 private List<Handler> handlers;
043
044 public JettyHttpEndpoint(JettyHttpComponent component, String uri, URI httpURL, HttpClientParams clientParams,
045 HttpConnectionManager httpConnectionManager, HttpClientConfigurer clientConfigurer) throws URISyntaxException {
046 super(uri, component, httpURL, clientParams, httpConnectionManager, clientConfigurer);
047 }
048
049 @Override
050 public Producer createProducer() throws Exception {
051 return super.createProducer();
052 }
053
054 @Override
055 public Consumer createConsumer(Processor processor) throws Exception {
056 return new HttpConsumer(this, processor);
057 }
058
059 public void setSessionSupport(boolean support) {
060 sessionSupport = support;
061 }
062
063 public boolean isSessionSupport() {
064 return sessionSupport;
065 }
066
067 public List<Handler> getHandlers() {
068 return handlers;
069 }
070
071 public void setHandlers(List<Handler> handlers) {
072 this.handlers = handlers;
073 }
074 }