You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/03/30 19:47:23 UTC

[5/7] camel git commit: CAMEL-9778: Remove deprecated GAE component and dependencies

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/bind/OutboundBindingSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/bind/OutboundBindingSupport.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/bind/OutboundBindingSupport.java
deleted file mode 100644
index 6a0a17c..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/bind/OutboundBindingSupport.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.bind;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.Producer;
-
-/**
- * Implemented by {@link Endpoint}s that provide an {@link OutboundBinding} to
- * {@link Producer}s.
- * 
- * @see InboundBinding
- */
-public interface OutboundBindingSupport<E extends Endpoint, S, T> {
-
-    OutboundBinding<E, S, T> getOutboundBinding();
-
-    void setOutboundBinding(OutboundBinding<E, S, T> outboundBinding);
-    
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/context/GaeDefaultCamelContext.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/context/GaeDefaultCamelContext.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/context/GaeDefaultCamelContext.java
deleted file mode 100644
index 3bc1f23..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/context/GaeDefaultCamelContext.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.context;
-
-import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.impl.SimpleRegistry;
-
-public class GaeDefaultCamelContext extends DefaultCamelContext {
-
-    public GaeDefaultCamelContext() {
-        // disable JMX and use the simple registry as JNDI is not allowed
-        disableJMX();
-        setRegistry(new SimpleRegistry());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpBinding.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpBinding.java
deleted file mode 100644
index fd86339..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpBinding.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.http;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.zip.GZIPInputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.google.appengine.api.urlfetch.HTTPHeader;
-import com.google.appengine.api.urlfetch.HTTPMethod;
-import com.google.appengine.api.urlfetch.HTTPRequest;
-import com.google.appengine.api.urlfetch.HTTPResponse;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.component.gae.bind.InboundBinding;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.spi.HeaderFilterStrategy;
-import org.apache.camel.util.UnsafeUriCharactersEncoder;
-
-import static org.apache.camel.component.gae.http.GHttpEndpoint.getEndpointUrl;
-import static org.apache.camel.util.GZIPHelper.isGzip;
-
-/**
- * Binds the {@link HTTPRequest}/{@link HTTPResponse} pair of the URL fetch
- * service to a Camel {@link Exchange}.
- */
-public class GHttpBinding implements 
-    OutboundBinding <GHttpEndpoint, HTTPRequest, HTTPResponse>, 
-    InboundBinding  <GHttpEndpoint, HttpServletRequest, HttpServletResponse> { 
-    
-    // ----------------------------------------------------------------
-    //  Outbound binding
-    // ----------------------------------------------------------------
-    
-    /**
-     * Reads data from <code>response</code> and writes it to the out-message of
-     * the <code>exchange</code>.
-     * 
-     * @return the original <code>exchange</code> instance populated with response data.
-     * @throws GHttpException if the response code is >= 400 and
-     *             {@link GHttpEndpoint#isThrowExceptionOnFailure()} returns
-     *             <code>true</code>.
-     */
-    public Exchange readResponse(GHttpEndpoint endpoint, Exchange exchange, HTTPResponse response) throws Exception {
-        int responseCode = response.getResponseCode();
-        readResponseHeaders(endpoint, exchange, response);
-        readResponseBody(endpoint, exchange, response);
-        if (responseCode >= 400 && endpoint.isThrowExceptionOnFailure()) {
-            throw new GHttpException(responseCode, 
-                exchange.getOut().getBody(InputStream.class), 
-                exchange.getOut().getHeaders());
-        }
-        return exchange;
-    }
-
-    /**
-     * Reads data from <code>exchange</code> and writes it to a newly created
-     * {@link HTTPRequest} instance. The <code>request</code> parameter is
-     * ignored.
-     *
-     * @return a newly created {@link HTTPRequest} instance containing data from
-     *         <code>exchange</code>.
-     */
-    public HTTPRequest writeRequest(GHttpEndpoint endpoint, Exchange exchange, HTTPRequest request) throws Exception {
-        HTTPRequest answer = new HTTPRequest(
-                getRequestUrl(endpoint, exchange), 
-                getRequestMethod(endpoint, exchange));
-        writeRequestHeaders(endpoint, exchange, answer);
-        writeRequestBody(endpoint, exchange, answer);
-        return answer;
-    }
-    
-    // ----------------------------------------------------------------
-    //  Inbound binding
-    // ----------------------------------------------------------------
-    
-    public Exchange readRequest(GHttpEndpoint endpoint, Exchange exchange, HttpServletRequest request) {
-        readRequestHeaders(endpoint, exchange, request);
-        return exchange;
-    }
-
-    public HttpServletResponse writeResponse(GHttpEndpoint endpoint, Exchange exchange, HttpServletResponse response) {
-        return response;
-    }
-
-    // ----------------------------------------------------------------
-    //  Customization points
-    // ----------------------------------------------------------------
-    
-    protected void readResponseHeaders(GHttpEndpoint endpoint, Exchange exchange, HTTPResponse response) {
-        HeaderFilterStrategy strategy = endpoint.getHeaderFilterStrategy();
-        
-        Message in = exchange.getIn();
-        Message out = exchange.getOut();
-        
-        out.setHeaders(in.getHeaders());
-        out.setHeader(Exchange.HTTP_RESPONSE_CODE, response.getResponseCode());
-        
-        String contentType = getResponseHeader("Content-Type", response);
-        if (contentType != null) {
-            out.setHeader(Exchange.CONTENT_TYPE, contentType);
-        }
-        
-        for (HTTPHeader header : response.getHeaders()) {
-            String name = header.getName();
-            String value = header.getValue();
-            if (strategy != null && !strategy.applyFilterToExternalHeaders(name, value, exchange)) {
-                out.setHeader(name, value);
-            }
-        }
-    }
-    
-    protected void readRequestHeaders(GHttpEndpoint endpoint, Exchange exchange, HttpServletRequest request) {
-        // EXPERIMENTAL // TODO: resolve gzip encoding issues
-        exchange.getIn().removeHeader("Accept-Encoding");
-        exchange.getIn().removeHeader("Content-Encoding");
-    }
-
-    protected void writeRequestHeaders(GHttpEndpoint endpoint, Exchange exchange, HTTPRequest request) {
-        HeaderFilterStrategy strategy = endpoint.getHeaderFilterStrategy();
-        for (String headerName : exchange.getIn().getHeaders().keySet()) {
-            String headerValue = exchange.getIn().getHeader(headerName, String.class);
-            if (strategy != null && !strategy.applyFilterToCamelHeaders(headerName, headerValue, exchange)) {
-                request.addHeader(new HTTPHeader(headerName, headerValue));
-            }
-        }
-    }
-    
-    protected void readResponseBody(GHttpEndpoint endpoint, Exchange exchange, HTTPResponse response) throws Exception {
-        byte[] content = response.getContent();
-        if (content != null) {
-            InputStream stream = new ByteArrayInputStream(content);
-            if (isGzip(getResponseHeader("Content-Encoding", response))) {
-                stream = new GZIPInputStream(stream);
-            }
-            exchange.getOut().setBody(stream);
-        }
-    }
-    
-    protected void writeRequestBody(GHttpEndpoint endpoint, Exchange exchange, HTTPRequest request) {
-        request.setPayload(exchange.getIn().getBody(byte[].class));
-    }
-    
-    protected URL getRequestUrl(GHttpEndpoint endpoint, Exchange exchange) throws Exception {
-        String uri = exchange.getIn().getHeader(Exchange.HTTP_URI, String.class);
-        String query = exchange.getIn().getHeader(Exchange.HTTP_QUERY, String.class);
-        if (uri != null && !endpoint.isBridgeEndpoint()) {
-            return getEndpointUrl(UnsafeUriCharactersEncoder.encodeHttpURI(uri), query);
-        }
-        return getEndpointUrl(endpoint.getEndpointUri(), query);
-    }
-    
-    protected HTTPMethod getRequestMethod(GHttpEndpoint endpoint, Exchange exchange) {
-        String method = (String)exchange.getIn().getHeader(Exchange.HTTP_METHOD);
-        if (method != null) {
-            return HTTPMethod.valueOf(method);
-        } else if (exchange.getIn().getBody() != null) {
-            return HTTPMethod.POST;
-        } else {
-            return HTTPMethod.GET;
-        }
-    }
-    
-    protected String getResponseHeader(String name, HTTPResponse response) {
-        for (HTTPHeader header : response.getHeaders()) {
-            if (header.getName().equalsIgnoreCase(name)) {
-                return header.getValue();
-            }
-        }
-        return null;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpComponent.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpComponent.java
deleted file mode 100644
index 2fecd4d..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpComponent.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.http;
-
-import java.net.URI;
-import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.google.appengine.api.urlfetch.HTTPRequest;
-import com.google.appengine.api.urlfetch.HTTPResponse;
-import org.apache.camel.Endpoint;
-import org.apache.camel.component.gae.bind.InboundBinding;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.component.servlet.ServletComponent;
-import org.apache.camel.component.servlet.ServletEndpoint;
-
-/**
- * The <a href="http://camel.apache.org/ghttp.html">Google App Engine HTTP
- * Component</a> supports HTTP-based inbound and outbound communication. Inbound
- * HTTP communication is realized in terms of the <a
- * href="http://camel.apache.org/servlet.html"> Servlet Component</a> component.
- * Outbound HTTP communication uses the URL fetch service of the Google App
- * Engine.
- */
-public class GHttpComponent extends ServletComponent {
-    public GHttpComponent() {
-        super(GHttpEndpoint.class);
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
-        boolean throwException = getAndRemoveParameter(parameters, "throwExceptionOnFailure", Boolean.class, true); 
-        boolean bridgeEndpoint = getAndRemoveParameter(parameters, "bridgeEndpoint", Boolean.class, true); 
-        OutboundBinding<GHttpEndpoint, HTTPRequest, HTTPResponse> outboundBinding = resolveAndRemoveReferenceParameter(
-                parameters, "outboundBindingRef", OutboundBinding.class, new GHttpBinding());
-        InboundBinding<GHttpEndpoint, HttpServletRequest, HttpServletResponse> inboundBinding = resolveAndRemoveReferenceParameter(
-                parameters, "inboundBindingRef", InboundBinding.class, new GHttpBinding());
-        GHttpEndpoint endpoint = (GHttpEndpoint)super.createEndpoint(uri, remaining, parameters);
-        endpoint.setThrowExceptionOnFailure(throwException);
-        endpoint.setBridgeEndpoint(bridgeEndpoint);
-        endpoint.setOutboundBinding(outboundBinding);
-        endpoint.setInboundBinding(inboundBinding);
-        return endpoint;
-    }
-
-    @Override
-    protected ServletEndpoint createServletEndpoint(String endpointUri, ServletComponent component, URI httpUri) throws Exception {
-        return new GHttpEndpoint(endpointUri, component, httpUri);
-    }
-
-    @Override
-    protected boolean lenientContextPath() {
-        // must use the path as-is
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpEndpoint.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpEndpoint.java
deleted file mode 100644
index 364307b..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpEndpoint.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.http;
-
-import java.lang.reflect.Proxy;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.google.appengine.api.urlfetch.HTTPRequest;
-import com.google.appengine.api.urlfetch.HTTPResponse;
-import com.google.appengine.api.urlfetch.URLFetchService;
-import com.google.appengine.api.urlfetch.URLFetchServiceFactory;
-import org.apache.camel.Exchange;
-import org.apache.camel.Producer;
-import org.apache.camel.component.gae.bind.HttpBindingInvocationHandler;
-import org.apache.camel.component.gae.bind.InboundBinding;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.component.gae.bind.OutboundBindingSupport;
-import org.apache.camel.component.servlet.ServletComponent;
-import org.apache.camel.component.servlet.ServletEndpoint;
-import org.apache.camel.http.common.HttpBinding;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.util.URISupport;
-import org.apache.camel.util.UnsafeUriCharactersEncoder;
-
-/**
- * The ghttp component provides HTTP connectivity to the GAE.
- */
-@UriEndpoint(scheme = "ghttp", extendsScheme = "servlet", title = "Google HTTP",
-        syntax = "ghttp:httpUri", producerOnly = true, label = "cloud,paas", lenientProperties = true)
-public class GHttpEndpoint extends ServletEndpoint implements OutboundBindingSupport<GHttpEndpoint, HTTPRequest, HTTPResponse> {
-
-    public static final String GHTTP_SCHEME = "ghttp";
-    public static final String GHTTPS_SCHEME = "ghttps";
-    public static final String HTTP_SCHEME = "http";
-    public static final String HTTPS_SCHEME = "https";
-    
-    private URLFetchService urlFetchService;
-    
-    private OutboundBinding<GHttpEndpoint, HTTPRequest, HTTPResponse> outboundBinding;
-    private InboundBinding<GHttpEndpoint, HttpServletRequest, HttpServletResponse> inboundBinding;
-    
-    public GHttpEndpoint(String endpointUri, ServletComponent component, URI httpUri) throws URISyntaxException {
-        // set the endpoint uri with httpUri as we need to create http producer here
-        super(httpUri.toString(), component, httpUri);
-        urlFetchService = URLFetchServiceFactory.getURLFetchService();
-    }
-
-    /**
-     * Constructs a {@link URL} from an <code>uri</code> and an optional
-     * <code>query</code> string. The encoding strategy follow those of the
-     * Camel HTTP component.
-     * 
-     * @param uri
-     *            must be encoded with
-     *            {@link UnsafeUriCharactersEncoder#encode(String)}.
-     * @param query
-     *            decoded query string. Replaces the query part of
-     *            <code>uri</code> if not <code>null</code>.
-     */
-    static URL getEndpointUrl(String uri, String query) throws Exception {
-        Map<String, Object> parameters = null;
-        URI uriObj = new URI(uri);
-        if (query == null) {
-            parameters = URISupport.parseParameters(uriObj);
-        } else {
-            parameters = URISupport.parseQuery(query, false, true);
-        }
-        if (uriObj.getScheme().equals(GHTTPS_SCHEME)) {
-            uriObj = new URI(HTTPS_SCHEME + ":" + uriObj.getRawSchemeSpecificPart());
-        } else { // ghttp or anything else
-            uriObj = new URI(HTTP_SCHEME + ":" + uriObj.getRawSchemeSpecificPart());
-        }
-        return URISupport.createRemainingURI(uriObj, parameters).toURL();
-    }
-    
-    public URL getEndpointUrl() throws Exception {
-        return getEndpointUrl(getEndpointUri(), null);
-    }
-    
-    public URLFetchService getUrlFetchService() {
-        return urlFetchService;
-    }
-
-    public void setUrlFetchService(URLFetchService urlFetchService) {
-        this.urlFetchService = urlFetchService;
-    }
-
-    public OutboundBinding<GHttpEndpoint, HTTPRequest, HTTPResponse> getOutboundBinding() {
-        return outboundBinding;
-    }
-    
-    public void setOutboundBinding(OutboundBinding<GHttpEndpoint, HTTPRequest, HTTPResponse> outboundBinding) {
-        this.outboundBinding = outboundBinding;
-    }
-    
-    public InboundBinding<GHttpEndpoint, HttpServletRequest, HttpServletResponse> getInboundBinding() {
-        return inboundBinding;
-    }
-
-    public void setInboundBinding(
-            InboundBinding<GHttpEndpoint, HttpServletRequest, HttpServletResponse> inboundBinding) {
-        this.inboundBinding = inboundBinding;
-    }
-
-    /**
-     * Proxies the {@link org.apache.camel.http.common.HttpBinding} returned by {@link super#getBinding()}
-     * with a dynamic proxy. The proxy's invocation handler further delegates to
-     * {@link InboundBinding#readRequest(org.apache.camel.Endpoint, Exchange, Object)}
-     * .
-     * 
-     * @return proxied {@link org.apache.camel.http.common.HttpBinding}.
-     */
-    @Override
-    public HttpBinding getBinding() {
-        return (HttpBinding)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {HttpBinding.class}, 
-                new HttpBindingInvocationHandler<GHttpEndpoint, HttpServletRequest, HttpServletResponse>(
-                        this, super.getBinding(), getInboundBinding()));
-    }
-
-    public Producer createProducer() throws Exception {
-        return new GHttpProducer(this);
-    }
-
-    @Override
-    public boolean isLenientProperties() {
-        // GHttpEndpoint could not know about all it's options on the passed URI
-        return true;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpException.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpException.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpException.java
deleted file mode 100644
index 68c7d31..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpException.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.http;
-
-import java.io.InputStream;
-import java.util.Map;
-
-import org.apache.camel.CamelException;
-
-/**
- * Thrown to indicate a response code >=400.
- */
-public class GHttpException extends CamelException {
-
-    private static final long serialVersionUID = -190965884678800954L;
-
-    private final int responseCode;
-    private final InputStream responseBody;
-    private final Map<String, Object> responseHeaders;
-    
-    public GHttpException(int responseCode, InputStream responseBody, Map<String, Object> responseHeaders) {
-        this.responseCode = responseCode;
-        this.responseBody = responseBody;
-        this.responseHeaders = responseHeaders;
-    }
-
-    public int getResponseCode() {
-        return responseCode;
-    }
-
-    public InputStream getResponseBody() {
-        return responseBody;
-    }
-
-    public Map<String, Object> getResponseHeaders() {
-        return responseHeaders;
-    }  
-    
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpProducer.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpProducer.java
deleted file mode 100644
index 9740de1..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/http/GHttpProducer.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.http;
-
-import com.google.appengine.api.urlfetch.HTTPRequest;
-import com.google.appengine.api.urlfetch.HTTPResponse;
-import com.google.appengine.api.urlfetch.URLFetchService;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.impl.DefaultProducer;
-
-public class GHttpProducer extends DefaultProducer {
-
-    public GHttpProducer(GHttpEndpoint endpoint) {
-        super(endpoint);
-    }
-    
-    @Override
-    public GHttpEndpoint getEndpoint() {
-        return (GHttpEndpoint)super.getEndpoint();
-    }
-    
-    public OutboundBinding<GHttpEndpoint, HTTPRequest, HTTPResponse> getOutboundBinding() {
-        return getEndpoint().getOutboundBinding();
-    }
-    
-    public URLFetchService getUrlFetchService() {
-        return getEndpoint().getUrlFetchService();
-    }
-
-    /**
-     * Invokes the URL fetch service.
-     * 
-     * @param exchange contains the request data in the in-message. The result is written to the out-message.
-     * @throws GHttpException if the response code is >= 400 and {@link GHttpEndpoint#isThrowExceptionOnFailure()}
-     * returns <code>true</code>.
-     *
-     * @see GHttpBinding
-     */
-    public void process(Exchange exchange) throws Exception {
-        HTTPRequest request = getOutboundBinding().writeRequest(getEndpoint(), exchange, null);
-        HTTPResponse response = getUrlFetchService().fetch(request);
-        getOutboundBinding().readResponse(getEndpoint(), exchange, response);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginBinding.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginBinding.java
deleted file mode 100644
index d9f5cc9..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginBinding.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.login;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-
-/**
- * Binds {@link GLoginData} to a Camel {@link Exchange}.
- */
-public class GLoginBinding implements OutboundBinding<GLoginEndpoint, GLoginData, GLoginData> {
-
-    /**
-     * Name of the Camel header defining the host name. Overrides
-     * {@link GLoginEndpoint#getHostName()}.
-     */
-    public static final String GLOGIN_HOST_NAME = "CamelGloginHostName";
-    
-    /**
-     * Name of the Camel header defining the login username. Overrides
-     * {@link GLoginEndpoint#getUserName()}.
-     */
-    public static final String GLOGIN_USER_NAME = "CamelGloginUserName";
-    
-    /**
-     * Name of the Camel header defining the login password. Overrides
-     * {@link GLoginEndpoint#getPassword()}.
-     */
-    public static final String GLOGIN_PASSWORD = "CamelGloginPassword";
-    
-    /**
-     * Name of the Camel header containing the resulting authentication token. 
-     */
-    public static final String GLOGIN_TOKEN = "CamelGloginToken";
-    
-    /**
-     * Name of the Camel header containing the resulting authorization cookie. 
-     */
-    public static final String GLOGIN_COOKIE = "CamelGloginCookie";
-
-    /**
-     * Creates a {@link GLoginData} object from endpoint and
-     * <code>exchange.getIn()</code> header data. The created object is used to
-     * obtain an authentication token and an authorization cookie.
-     */
-    public GLoginData writeRequest(GLoginEndpoint endpoint, Exchange exchange, GLoginData request) {
-        String hostName = exchange.getIn().getHeader(GLOGIN_HOST_NAME, String.class); 
-        String userName = exchange.getIn().getHeader(GLOGIN_USER_NAME, String.class); 
-        String password = exchange.getIn().getHeader(GLOGIN_PASSWORD, String.class); 
-        
-        request = new GLoginData();
-        if (hostName == null) {
-            hostName = endpoint.getHostName();
-        }
-        if (userName == null) {
-            userName = endpoint.getUserName();
-        }
-        if (password == null) {
-            password = endpoint.getPassword();
-        }
-        request.setClientName(endpoint.getClientName());
-        request.setDevAdmin(endpoint.isDevAdmin());
-        request.setDevPort(endpoint.getDevPort());
-        request.setDevMode(endpoint.isDevMode());
-        request.setHostName(hostName);
-        request.setUserName(userName);
-        request.setPassword(password);
-        return request;
-    }
-
-    /**
-     * Creates an <code>exchange.getOut()</code> message with a
-     * {@link #GLOGIN_TOKEN} header containing an authentication token and a
-     * {@link #GLOGIN_COOKIE} header containing an authorization cookie. If the
-     * endpoint is configured to run in development mode, no authentication
-     * token will be set, only an authorization cookie.
-     */
-    public Exchange readResponse(GLoginEndpoint endpoint, Exchange exchange, GLoginData response) throws Exception {
-        if (response.getAuthenticationToken() != null) {
-            exchange.getOut().setHeader(GLOGIN_TOKEN, response.getAuthenticationToken());
-        }
-        if (response.getAuthorizationCookie() != null) {
-            exchange.getOut().setHeader(GLOGIN_COOKIE, response.getAuthorizationCookie());
-        }
-        return exchange;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginComponent.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginComponent.java
deleted file mode 100644
index 9504aed..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginComponent.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.login;
-
-import java.util.Map;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Endpoint;
-import org.apache.camel.component.gae.auth.GAuthComponent;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.impl.UriEndpointComponent;
-
-/**
- * The <a href="http://camel.apache.org/glogin.html">GLogin Component</a>
- * encapsulates the required steps needed to login to an Google App Engine (GAE)
- * application. This component uses <a
- * href="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html"
- * >ClientLogin</a> for authentication and a GAE-specific mechanism for
- * authorization. Result of the login procedure is an authorization cookie that
- * should be included in HTTP requests targeted at GAE applications. This
- * component is intended for being used by Java client applications that want to
- * do a programmatic login to GAE applications. Web applications should use the
- * {@link GAuthComponent} for access authorization to other web applications.
- */
-public class GLoginComponent extends UriEndpointComponent {
-
-    public GLoginComponent() {
-        super(GLoginEndpoint.class);
-    }
-
-    public GLoginComponent(CamelContext context) {
-        super(context, GLoginEndpoint.class);
-    }
-
-    @Override
-    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
-        OutboundBinding<GLoginEndpoint, GLoginData, GLoginData> outboundBinding = resolveAndRemoveReferenceParameter(
-                parameters, "outboundBindingRef", GLoginBinding.class, new GLoginBinding());
-        GLoginService service = resolveAndRemoveReferenceParameter(
-                parameters, "serviceRef", GLoginService.class, new GLoginServiceImpl());
-        GLoginEndpoint endpoint = new GLoginEndpoint(uri, this, 
-                getHostName(remaining),
-                getDevPort(remaining));
-        endpoint.setOutboundBinding(outboundBinding);
-        endpoint.setService(service);
-        return endpoint;
-    }
-
-    private static String getHostName(String remaining) {
-        if (remaining.contains(":")) {
-            return remaining.split(":")[0];
-        } else {
-            return remaining;
-        }
-    }
-    
-    private static int getDevPort(String remaining) {
-        if (remaining.contains(":")) {
-            return Integer.parseInt(remaining.split(":")[1]);
-        } else {
-            return 8080;
-        }
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginData.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginData.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginData.java
deleted file mode 100644
index ab077b6..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginData.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.login;
-
-/**
- * Container for login request and response data. 
- */
-public class GLoginData {
-
-    private String hostName;
-    private String clientName;
-    private String userName;
-    private String password;
-    private int devPort;
-    private boolean devAdmin;
-    private boolean devMode;
-    private String authenticationToken;
-    private String authorizationCookie;
-
-    /**
-     * @see GLoginEndpoint#getHostName()
-     * @see GLoginBinding#GLOGIN_HOST_NAME
-     */
-    public String getHostName() {
-        return hostName;
-    }
-
-    public void setHostName(String hostName) {
-        this.hostName = hostName;
-    }
-
-    public String getClientName() {
-        return clientName;
-    }
-
-    public void setClientName(String clientName) {
-        this.clientName = clientName;
-    }
-
-    /**
-     * @see GLoginBinding#GLOGIN_USER_NAME
-     */
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    /**
-     * @see GLoginBinding#GLOGIN_PASSWORD
-     */
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-    
-    /**
-     * @see GLoginEndpoint#getDevPort()
-     */
-    public int getDevPort() {
-        return devPort;
-    }
-
-    public void setDevPort(int devPort) {
-        this.devPort = devPort;
-    }
-
-    public boolean isDevAdmin() {
-        return devAdmin;
-    }
-
-    public void setDevAdmin(boolean devAdmin) {
-        this.devAdmin = devAdmin;
-    }
-
-    public boolean isDevMode() {
-        return devMode;
-    }
-
-    public void setDevMode(boolean devMode) {
-        this.devMode = devMode;
-    }
-
-    public String getAuthenticationToken() {
-        return authenticationToken;
-    }
-
-    /**
-     * @see GLoginBinding#GLOGIN_TOKEN
-     */
-    public void setAuthenticationToken(String authenticationToken) {
-        this.authenticationToken = authenticationToken;
-    }
-
-    public String getAuthorizationCookie() {
-        return authorizationCookie;
-    }
-
-    /**
-     * @see GLoginBinding#GLOGIN_COOKIE
-     */
-    public void setAuthorizationCookie(String authorizationCookie) {
-        this.authorizationCookie = authorizationCookie;
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginEndpoint.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginEndpoint.java
deleted file mode 100644
index 4b7fe7a..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginEndpoint.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.login;
-
-import org.apache.camel.Component;
-import org.apache.camel.Consumer;
-import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.impl.DefaultEndpoint;
-import org.apache.camel.spi.Metadata;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
-import org.apache.camel.spi.UriPath;
-
-/**
- * The glogin component is used by Camel applications outside Google App Engine (GAE) for programmatic login to GAE applications.
- */
-@UriEndpoint(scheme = "glogin", title = "Google Login", syntax = "glogin:hostName", producerOnly = true, label = "cloud,paas", excludeProperties = "httpUri")
-public class GLoginEndpoint extends DefaultEndpoint {
-
-    private OutboundBinding<GLoginEndpoint, GLoginData, GLoginData> outboundBinding;
-    private GLoginService service;
-
-    @UriPath @Metadata(required = "true")
-    private String hostName;
-    @UriParam
-    private String clientName;
-    @UriParam
-    private String userName;
-    @UriParam
-    private String password;
-    @UriParam
-    private int devPort;
-    @UriParam
-    private boolean devAdmin;
-    @UriParam
-    private boolean devMode;
-    @UriParam
-    private String serviceRef;
-
-
-    /**
-     * Creates a new GLoginEndpoint.
-     * 
-     * @param endpointUri the endpoint uri
-     * @param component component that created this endpoint.
-     * @param hostName internet hostname of a GAE application, for example
-     *            <code>example.appspot.com</code>, or <code>localhost</code> if
-     *            the application is running on a local development server.
-     * @param devPort port for connecting to the local development server.
-     */
-    public GLoginEndpoint(String endpointUri, Component component, String hostName, int devPort) {
-        super(endpointUri, component);
-        this.hostName = hostName;
-        this.clientName = "apache-camel-2.x";
-        this.devPort = devPort;
-        this.devAdmin = false;
-    }
-
-    /**
-     * Returns the component instance that created this endpoint.
-     */
-    @Override
-    public GLoginComponent getComponent() {
-        return (GLoginComponent)super.getComponent();
-    }
-
-    /**
-     * Returns the internet hostname of the GAE application where to login.
-     */
-    public String getHostName() {
-        return hostName;
-    }
-
-    public OutboundBinding<GLoginEndpoint, GLoginData, GLoginData> getOutboundBinding() {
-        return outboundBinding;
-    }
-
-    /**
-     * Sets the outbound binding for <code>glogin</code> endpoints. Default binding
-     * is {@link GLoginBinding}.
-     */
-    public void setOutboundBinding(OutboundBinding<GLoginEndpoint, GLoginData, GLoginData> outboundBinding) {
-        this.outboundBinding = outboundBinding;
-    }
-
-    public String getClientName() {
-        return clientName;
-    }
-
-    /**
-     * Sets the client name used for authentication. The default name is
-     * <code>apache-camel-2.x</code>.
-     */
-    public void setClientName(String clientName) {
-        this.clientName = clientName;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    /**
-     * Sets the login username (a Google mail address).
-     */
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    /**
-     * Sets the login password.
-     */
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    /**
-     * Returns the port for connecting to a development server. Only used
-     * if {@link #devMode} is <code>true</code>. Default is 8080.
-     */
-    public int getDevPort() {
-        return devPort;
-    }
-
-    public boolean isDevAdmin() {
-        return devAdmin;
-    }
-
-    /**
-     * Set to <code>true</code> for logging in as admin to a development server.
-     * Only used if {@link #devMode} is <code>true</code>. Default is
-     * <code>false</code>.
-     */
-    public void setDevAdmin(boolean devAdmin) {
-        this.devAdmin = devAdmin;
-    }
-
-    public boolean isDevMode() {
-        return devMode;
-    }
-
-    /**
-     * Set to <code>true</code> for connecting to a development server.
-     */
-    public void setDevMode(boolean devMode) {
-        this.devMode = devMode;
-    }
-
-    public GLoginService getService() {
-        return service;
-    }
-
-    /**
-     * Sets the service that makes the remote calls to Google services or the
-     * local development server. Testing code should inject a mock service here
-     * (using serviceRef in endpoint URI).
-     */
-    public void setService(GLoginService service) {
-        this.service = service;
-    }
-
-    public String getServiceRef() {
-        return serviceRef;
-    }
-
-    /**
-     * A reference name to lookup a {@link GLoginService} from the registry.
-     * <p/>
-     * The GloginService the service that makes the remote calls to Google services or the
-     * local development server.
-     */
-    public void setServiceRef(String serviceRef) {
-        this.serviceRef = serviceRef;
-    }
-
-    /**
-     * Creates a {@link GLoginProducer}.
-     */
-    public Producer createProducer() throws Exception {
-        return new GLoginProducer(this);
-    }
-
-    /**
-     * throws {@link UnsupportedOperationException}
-     */
-    public Consumer createConsumer(Processor processor) throws Exception {
-        throw new UnsupportedOperationException("consumption from glogin endpoint not supported");
-    }
-
-    /**
-     * Returns <code>true</code>.
-     */
-    public boolean isSingleton() {
-        return true;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginProducer.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginProducer.java
deleted file mode 100644
index 7c5003a..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginProducer.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.login;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.impl.DefaultProducer;
-
-public class GLoginProducer extends DefaultProducer {
-
-    public GLoginProducer(GLoginEndpoint endpoint) {
-        super(endpoint);
-    }
-
-    @Override
-    public GLoginEndpoint getEndpoint() {
-        return (GLoginEndpoint)super.getEndpoint();
-    }
-
-    public OutboundBinding<GLoginEndpoint, GLoginData, GLoginData> getOutboundBinding() {
-        return getEndpoint().getOutboundBinding();
-    }
-
-    public GLoginService getService() {
-        return getEndpoint().getService();
-    }
-
-    /**
-     * First obtains an authentication token and then exchanges the token against
-     * an authorization cookie.
-     *
-     * @see GLoginBinding
-     * @see GLoginServiceImpl
-     */
-    public void process(Exchange exchange) throws Exception {
-        GLoginData data = getOutboundBinding().writeRequest(getEndpoint(), exchange, null);
-        getService().authenticate(data);
-        getOutboundBinding().readResponse(getEndpoint(), exchange, data);
-        getService().authorize(data);
-        getOutboundBinding().readResponse(getEndpoint(), exchange, data);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginService.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginService.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginService.java
deleted file mode 100644
index a5552e7..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.login;
-
-/**
- * Interface to login services. 
- */
-public interface GLoginService {
-
-    /**
-     * Authenticates a user and stores the authentication token to
-     * {@link GLoginData#setAuthenticationToken(String)} (only if needed by
-     * {@link #authorize(GLoginData)}).
-     * 
-     * @param data authentication input data and response data (authentication token) container.
-     */
-    void authenticate(GLoginData data) throws Exception;
-
-    /**
-     * Authorizes access to an application and stores an authorization cookie to
-     * {@link GLoginData#setAuthorizationCookie(String)}.
-     * 
-     * @param data authentication input data and response data (authorization cookie) container.
-     */
-    void authorize(GLoginData data) throws Exception;
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginServiceImpl.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginServiceImpl.java
deleted file mode 100644
index 2640765..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginServiceImpl.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.login;
-
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.nio.charset.Charset;
-
-import com.google.gdata.client.GoogleAuthTokenFactory;
-import com.google.gdata.util.AuthenticationException;
-
-/**
- * Implements the interactions with Google's authentication and authorization
- * services. If the endpoint is configured to run in development mode the
- * authentication and authorization services of the development server are used.
- */
-public class GLoginServiceImpl implements GLoginService {
-
-    /**
-     * Authenticates a user and stores the authentication token to
-     * {@link GLoginData#setAuthenticationToken(String)}. If the endpoint is
-     * configured to run in development mode this method simply returns without
-     * any further action. 
-     */
-    public void authenticate(GLoginData data) throws AuthenticationException {
-        if (data.isDevMode()) {
-            return;
-        }
-        GoogleAuthTokenFactory factory = 
-            new GoogleAuthTokenFactory("ah", data.getClientName(), null);
-        String token = factory.getAuthToken(
-            data.getUserName(), 
-            data.getPassword(), 
-            null, null, "ah", data.getClientName());
-        data.setAuthenticationToken(token);       
-    }
-
-    /**
-     * Dispatches authorization to {@link #authorizeDev(GLoginData)} if the
-     * endpoint is configured to run in development mode, otherwise to
-     * {@link #authorizeStd(GLoginData)}.
-     */
-    public void authorize(GLoginData data) throws Exception {
-        if (data.isDevMode()) {
-            authorizeDev(data);
-        } else {
-            authorizeStd(data);
-        }
-    }
-
-    /**
-     * Authorizes access to a development server and stores the resulting
-     * authorization cookie to {@link GLoginData#setAuthorizationCookie(String)}
-     * . Authorization in development mode doesn't require an authentication
-     * token.
-     */
-    protected void authorizeDev(GLoginData data) throws Exception {
-        String homeLocation = String.format("http://%s:%d", data.getHostName(), data.getDevPort());
-        HttpURLConnection connection = createURLConnection(homeLocation + "/_ah/login", true);
-        connection.connect();
-        PrintWriter writer = new PrintWriter(
-            new OutputStreamWriter(connection.getOutputStream()));
-        writer.println(String.format("email=%s&isAdmin=%s&continue=%s",
-            URLEncoder.encode(data.getUserName(), Charset.defaultCharset().name()), 
-            data.isDevAdmin() ? "on" : "off", 
-            URLEncoder.encode(homeLocation, Charset.defaultCharset().name())));
-        writer.flush();
-        data.setAuthorizationCookie(connection.getHeaderField("Set-Cookie"));
-        connection.disconnect();        
-    }
-    
-    /**
-     * Authorizes access to a Google App Engine application and stores the
-     * resulting authorization cookie to
-     * {@link GLoginData#setAuthorizationCookie(String)}. This method requires
-     * an authentication token from
-     * {@link GLoginData#getAuthenticationToken()}.
-     */
-    protected void authorizeStd(GLoginData data) throws Exception {
-        String url = String.format("https://%s/_ah/login?auth=%s",
-            data.getHostName(), data.getAuthenticationToken());
-        HttpURLConnection connection = createURLConnection(url, false);
-        connection.connect();
-        data.setAuthorizationCookie(connection.getHeaderField("Set-Cookie"));
-        connection.disconnect();
-    }
-    
-    private static HttpURLConnection createURLConnection(String url, boolean dev) throws Exception {
-        // TODO: support usage of proxy (via endpoint parameters or GLoginData object)
-        HttpURLConnection connection = (HttpURLConnection)new URL(url).openConnection();
-        connection.setInstanceFollowRedirects(false);
-        if (dev) {
-            connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
-            connection.setRequestMethod("POST");
-            connection.setDoOutput(true);
-        }
-        return connection;
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailBinding.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailBinding.java
deleted file mode 100644
index ef39270..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailBinding.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.mail;
-
-import com.google.appengine.api.mail.MailService.Message;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-
-/**
- * Binds the {@link Message} of the mail service to a Camel {@link Exchange}.
- */
-public class GMailBinding implements OutboundBinding<GMailEndpoint, Message, Void> {
-
-    /**
-     * Camel header for setting the mail message sender.
-     */
-    public static final String GMAIL_SENDER = "CamelGmailSender";
-    
-    /**
-     * Camel header for setting the mail message subject.
-     */
-    public static final String GMAIL_SUBJECT = "CamelGmailSubject";
-
-    /**
-     * Camel header for setting the mail message to-recipient (single recipient
-     * or comma-separated list).
-     */
-    public static final String GMAIL_TO = "CamelGmailTo";
-    
-    /**
-     * Camel header for setting the mail message cc-recipient (single recipient
-     * or comma-separated list).
-     */
-    public static final String GMAIL_CC = "CamelGmailCc";
-    
-    /**
-     * Camel header for setting the mail message bcc-recipient (single recipient
-     * or comma-separated list).
-     */
-    public static final String GMAIL_BCC = "CamelGmailBcc";
-    
-    /**
-     * Reads data from <code>exchange</code> and writes it to a newly created
-     * {@link Message} instance. The <code>request</code> parameter is
-     * ignored.
-     *
-     * @return a newly created {@link Message} instance containing data from <code>exchange</code>.
-     */
-    public Message writeRequest(GMailEndpoint endpoint, Exchange exchange, Message request) {
-        Message message = new Message();
-        writeFrom(endpoint, exchange, message);
-        writeTo(endpoint, exchange, message);
-        writeCc(endpoint, exchange, message);
-        writeBcc(endpoint, exchange, message);
-        writeSubject(endpoint, exchange, message);
-        writeBody(endpoint, exchange, message);
-        writeAttachments(endpoint, exchange, message);
-        return message;
-    }
-
-    public Exchange readResponse(GMailEndpoint endpoint, Exchange exchange, Void response) {
-        throw new UnsupportedOperationException("gmail responses not supported");
-    }
-
-    protected void writeFrom(GMailEndpoint endpoint, Exchange exchange, Message request) {
-        String sender = (String)exchange.getIn().getHeader(GMAIL_SENDER);
-        if (sender == null) {
-            sender = endpoint.getSender();
-        }
-        request.setSender(sender);
-    }
-    
-    protected void writeTo(GMailEndpoint endpoint, Exchange exchange, Message request) {
-        String to = (String)exchange.getIn().getHeader(GMAIL_TO);
-        if (to == null) {
-            to = endpoint.getTo();
-        }
-        request.setTo(to.split(","));
-    }
-    
-    protected void writeCc(GMailEndpoint endpoint, Exchange exchange, Message request) {
-        String cc = (String)exchange.getIn().getHeader(GMAIL_CC);
-        if (cc == null) {
-            cc = endpoint.getCc();
-        }
-        if (cc != null) {
-            request.setCc(cc.split(","));
-        }
-    }
-    
-    protected void writeBcc(GMailEndpoint endpoint, Exchange exchange, Message request) {
-        String bcc = (String)exchange.getIn().getHeader(GMAIL_BCC);
-        if (bcc == null) {
-            bcc = endpoint.getBcc();
-        }
-        if (bcc != null) {
-            request.setBcc(bcc.split(","));
-        }
-    }
-    
-    protected void writeSubject(GMailEndpoint endpoint, Exchange exchange, Message request) {
-        String subject = (String)exchange.getIn().getHeader(GMAIL_SUBJECT);
-        if (subject == null) {
-            subject = endpoint.getSubject();
-        }
-        request.setSubject(subject);
-    }
-    
-    protected void writeBody(GMailEndpoint endpoint, Exchange exchange, Message request) {
-        // TODO: allow message header or endpoint uri to configure character encoding
-        request.setTextBody(exchange.getIn().getBody(String.class));
-    }
-    
-    protected void writeAttachments(GMailEndpoint endpoint, Exchange exchange, Message request) {
-        // TODO: support attachments
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailComponent.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailComponent.java
deleted file mode 100644
index 4c4115b..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailComponent.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.mail;
-
-import java.util.Map;
-
-import com.google.appengine.api.mail.MailService.Message;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.impl.UriEndpointComponent;
-
-/**
- * The <a href="http://camel.apache.org/gmail.html">Google App Engine Mail
- * Component</a> supports outbound mail communication. It makes use of the mail
- * service provided by Google App Engine.
- */
-public class GMailComponent extends UriEndpointComponent {
-
-    public GMailComponent() {
-        super(GMailEndpoint.class);
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
-        OutboundBinding<GMailEndpoint, Message, Void> binding = resolveAndRemoveReferenceParameter(
-                parameters, "outboundBindingRef", OutboundBinding.class, new GMailBinding());
-        GMailEndpoint endpoint = new GMailEndpoint(uri, this, remaining);
-        endpoint.setOutboundBinding(binding);
-        return endpoint;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailEndpoint.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailEndpoint.java
deleted file mode 100644
index e2ed498..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailEndpoint.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.mail;
-
-import com.google.appengine.api.mail.MailService;
-import com.google.appengine.api.mail.MailService.Message;
-import com.google.appengine.api.mail.MailServiceFactory;
-
-import org.apache.camel.Component;
-import org.apache.camel.Consumer;
-import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.component.gae.bind.OutboundBindingSupport;
-import org.apache.camel.impl.DefaultEndpoint;
-import org.apache.camel.spi.Metadata;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
-import org.apache.camel.spi.UriPath;
-
-/**
- * The gmail component is used for sending emails to GAE.
- */
-@UriEndpoint(scheme = "gmail", title = "Google mail", syntax = "gmail:sender", producerOnly = true, label = "cloud,mail,paas", excludeProperties = "httpUri")
-public class GMailEndpoint extends DefaultEndpoint implements OutboundBindingSupport<GMailEndpoint, Message, Void> {
-
-    private OutboundBinding<GMailEndpoint, Message, Void> outboundBinding;
-    private MailService mailService;
-    @UriPath(description = "The email of the sender") @Metadata(required = "true")
-    private String sender;
-    @UriParam
-    private String subject;
-    @UriParam
-    private String to;
-    @UriParam
-    private String cc;
-    @UriParam
-    private String bcc;
-    
-    public GMailEndpoint(String endpointUri, Component component, String sender) {
-        super(endpointUri, component);
-        this.sender = sender;
-        this.mailService = MailServiceFactory.getMailService();
-    }
-    
-    public OutboundBinding<GMailEndpoint, Message, Void> getOutboundBinding() {
-        return outboundBinding;
-    }
-
-    public void setOutboundBinding(OutboundBinding<GMailEndpoint, Message, Void> outboundBinding) {
-        this.outboundBinding = outboundBinding;
-    }
-    
-    public MailService getMailService() {
-        return mailService;
-    }
-
-    public String getSender() {
-        return sender;
-    }
-    
-    public String getSubject() {
-        return subject;
-    }
-
-    /**
-     * Subject of the email.
-     */
-    public void setSubject(String subject) {
-        this.subject = subject;
-    }
-
-    public String getTo() {
-        return to;
-    }
-
-    /**
-     * To-receiver of the email. This can be a single receiver or a comma-separated list of receivers.
-     */
-    public void setTo(String to) {
-        this.to = to;
-    }
-
-    public String getCc() {
-        return cc;
-    }
-
-    /**
-     * Cc-receiver of the email. This can be a single receiver or a comma-separated list of receivers.
-     */
-    public void setCc(String cc) {
-        this.cc = cc;
-    }
-
-    public String getBcc() {
-        return bcc;
-    }
-
-    /**
-     * Bcc-receiver of the email. This can be a single receiver or a comma-separated list of receivers.
-     */
-    public void setBcc(String bcc) {
-        this.bcc = bcc;
-    }
-
-    public Consumer createConsumer(Processor processor) throws Exception {
-        throw new UnsupportedOperationException("consumption from gmail endpoint not supported");
-    }
-
-    public Producer createProducer() throws Exception {
-        return new GMailProducer(this);
-    }
-
-    public boolean isSingleton() {
-        return true;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailProducer.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailProducer.java
deleted file mode 100644
index ed92f37..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailProducer.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.mail;
-
-import com.google.appengine.api.mail.MailService;
-import com.google.appengine.api.mail.MailService.Message;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.impl.DefaultProducer;
-
-public class GMailProducer extends DefaultProducer {
-
-    public GMailProducer(GMailEndpoint endpoint) {
-        super(endpoint);
-    }
-
-    @Override
-    public GMailEndpoint getEndpoint() {
-        return (GMailEndpoint)super.getEndpoint();
-    }
-    
-    public OutboundBinding<GMailEndpoint, Message, Void> getOutboundBinding() {
-        return getEndpoint().getOutboundBinding();
-    }
-    
-    public MailService getMailService() {
-        return getEndpoint().getMailService();
-    }
-
-    /**
-     * Invokes the mail service.
-     * 
-     * @param exchange contains the mail data in the in-message.
-     * @see GMailBinding
-     */
-    public void process(Exchange exchange) throws Exception {
-        getMailService().send(getOutboundBinding().writeRequest(getEndpoint(), exchange, null));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskBinding.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskBinding.java
deleted file mode 100644
index ba971d3..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskBinding.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.task;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.google.appengine.api.taskqueue.TaskOptions;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.component.gae.bind.InboundBinding;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.spi.HeaderFilterStrategy;
-
-/**
- * Binds the {@link TaskOptions} of the task queueing service to a Camel
- * {@link Exchange} for outbound communication. For inbound communication a
- * {@link org.apache.camel.http.common.HttpMessage} is bound to {@link Exchange}.
- */
-public class GTaskBinding implements 
-    OutboundBinding <GTaskEndpoint, TaskOptions, Void>,
-    InboundBinding  <GTaskEndpoint, HttpServletRequest, HttpServletResponse> { 
-
-    /**
-     * Camel header name corresponding to <code>X-AppEngine-QueueName</code>
-     * header created by task queueing service.
-     */
-    public static final String GTASK_QUEUE_NAME = "CamelGtaskQueueName";
-
-    /**
-     * Camel header name corresponding to <code>X-AppEngine-TaskName</code>
-     * header created by task queueing service.
-     */
-    public static final String GTASK_TASK_NAME = "CamelGtaskTaskName";
-    
-    /**
-     * Camel header name corresponding to <code>X-AppEngine-TaskRetryCount</code>
-     * header created by task queueing service.
-     */
-    public static final String GTASK_RETRY_COUNT = "CamelGtaskRetryCount";
-
-    static final String GAE_QUEUE_NAME = "X-AppEngine-QueueName";
-    static final String GAE_TASK_NAME = "X-AppEngine-TaskName";
-    static final String GAE_RETRY_COUNT = "X-AppEngine-TaskRetryCount";
-    
-    // ----------------------------------------------------------------
-    //  Outbound binding
-    // ----------------------------------------------------------------
-    
-    /**
-     * Reads data from <code>exchange</code> and writes it to a newly created
-     * {@link TaskOptions} instance. The <code>request</code> parameter is
-     * ignored.
-     *
-     * @return a newly created {@link TaskOptions} instance containing data from
-     *         <code>exchange</code>.
-     */
-    public TaskOptions writeRequest(GTaskEndpoint endpoint, Exchange exchange, TaskOptions request) {
-        TaskOptions answer = TaskOptions.Builder.withUrl(getWorkerRoot(endpoint) + endpoint.getPath());
-        writeRequestHeaders(endpoint, exchange, answer);
-        writeRequestBody(endpoint, exchange, answer);
-        // TODO: consider TaskOptions method (POST, GET, ...)
-        return answer;
-    }
-    
-    /**
-     * @throws UnsupportedOperationException
-     */
-    public Exchange readResponse(GTaskEndpoint endpoint, Exchange exchange, Void response) {
-        throw new UnsupportedOperationException("gtask responses not supported");
-    }
-
-    // ----------------------------------------------------------------
-    //  Inbound binding
-    // ----------------------------------------------------------------
-    
-    /**
-     * Replaces the task service-specific headers (<code>X-AppEngine-*</code>)
-     * with Camel-specific headers.
-     * 
-     * @see GTaskBinding#GTASK_QUEUE_NAME
-     * @see GTaskBinding#GTASK_TASK_NAME
-     * @see GTaskBinding#GTASK_RETRY_COUNT
-     * @see org.apache.camel.http.common.DefaultHttpBinding#readRequest(HttpServletRequest, org.apache.camel.http.common.HttpMessage)
-     */
-    public Exchange readRequest(GTaskEndpoint endpoint, Exchange exchange, HttpServletRequest request) {
-        readRequestHeaders(endpoint, exchange, request);
-        return exchange;
-    }
-
-    public HttpServletResponse writeResponse(GTaskEndpoint endpoint, Exchange exchange, HttpServletResponse response) {
-        return response;
-    }
-
-    // ----------------------------------------------------------------
-    //  Customization points
-    // ----------------------------------------------------------------
-    
-    protected void writeRequestHeaders(GTaskEndpoint endpoint, Exchange exchange, TaskOptions request) {
-        HeaderFilterStrategy strategy = endpoint.getHeaderFilterStrategy();
-        for (String headerName : exchange.getIn().getHeaders().keySet()) {
-            String headerValue = exchange.getIn().getHeader(headerName, String.class);
-            if (strategy != null && !strategy.applyFilterToCamelHeaders(headerName, headerValue, exchange)) {
-                request.header(headerName, headerValue);
-            }
-        }
-    }
-
-    protected void readRequestHeaders(GTaskEndpoint endpoint, Exchange exchange, HttpServletRequest request) {
-        Message message = exchange.getIn();
-        String key = GAE_QUEUE_NAME;
-        Object val = message.getHeader(key);
-        if (val != null) {
-            message.getHeaders().put(GTASK_QUEUE_NAME, val);
-            message.getHeaders().remove(key);
-        }
-        key = GAE_TASK_NAME;
-        val = message.getHeader(key);
-        if (val != null) {
-            message.getHeaders().put(GTASK_TASK_NAME, val);
-            message.getHeaders().remove(key);
-        }
-        key = GAE_RETRY_COUNT;
-        val = message.getHeader(key);
-        if (val != null) {
-            message.getHeaders().put(GTASK_RETRY_COUNT, Integer.parseInt(val.toString()));
-            message.getHeaders().remove(key);
-        }
-        // EXPERIMENTAL // TODO: resolve gzip encoding issues
-        exchange.getIn().removeHeader("Accept-Encoding");
-        exchange.getIn().removeHeader("Content-Encoding");
-    }
-    
-    protected void writeRequestBody(GTaskEndpoint endpoint, Exchange exchange, TaskOptions request) {
-        // TODO: allow message header or endpoint uri to configure character encoding and content type
-        request.payload(exchange.getIn().getBody(byte[].class), "application/octet-stream");
-    }
-    
-    protected String getWorkerRoot(GTaskEndpoint endpoint) {
-        return "/" + endpoint.getWorkerRoot();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/8f0bcd80/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskComponent.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskComponent.java
deleted file mode 100644
index da029e6..0000000
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskComponent.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.gae.task;
-
-import java.net.URI;
-import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.google.appengine.api.taskqueue.QueueFactory;
-import com.google.appengine.api.taskqueue.TaskOptions;
-import org.apache.camel.Endpoint;
-import org.apache.camel.component.gae.bind.InboundBinding;
-import org.apache.camel.component.gae.bind.OutboundBinding;
-import org.apache.camel.component.servlet.ServletComponent;
-import org.apache.camel.component.servlet.ServletEndpoint;
-import org.apache.camel.http.common.HttpConsumer;
-
-/**
- * The <a href="http://camel.apache.org/gtask.html">Google App Engine Task
- * Queueing Component</a> supports asynchronous message processing. Outbound
- * communication uses the task queueing service of the Google App Engine.
- * Inbound communication is realized in terms of the <a
- * href="http://camel.apache.org/servlet.html">Servlet Component</a> component
- * for installing a web hook.
- */
-public class GTaskComponent extends ServletComponent {
-
-    public GTaskComponent() {
-        super(GTaskEndpoint.class);
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
-        String workerRoot = getAndRemoveParameter(parameters, "workerRoot", String.class, "worker");
-        String inboundBindingRef = (String) parameters.get("inboundBindingRef");
-        String outboundBindingRef = (String) parameters.get("outboundBindingRef");
-
-        OutboundBinding<GTaskEndpoint, TaskOptions, Void> outboundBinding = resolveAndRemoveReferenceParameter(
-                parameters, "outboundBindingRef", OutboundBinding.class, new GTaskBinding());
-        InboundBinding<GTaskEndpoint, HttpServletRequest, HttpServletResponse> inboundBinding = resolveAndRemoveReferenceParameter(
-                parameters, "inboundBindingRef", InboundBinding.class, new GTaskBinding());
-
-        GTaskEndpointInfo info = new GTaskEndpointInfo(uri, remaining);
-        GTaskEndpoint endpoint = (GTaskEndpoint)super.createEndpoint(
-            info.getCanonicalUri(),
-            info.getCanonicalUriPath(),
-            parameters);
-
-        endpoint.setServletName(getServletName());
-        endpoint.setWorkerRoot(workerRoot);
-        endpoint.setOutboundBinding(outboundBinding);
-        endpoint.setInboundBinding(inboundBinding);
-        endpoint.setQueueName(remaining);
-        endpoint.setQueue(QueueFactory.getQueue(remaining));
-        endpoint.setInboundBindingRef(inboundBindingRef);
-        endpoint.setOutboundBindingRef(outboundBindingRef);
-        return endpoint;
-    }
-
-    @Override
-    protected ServletEndpoint createServletEndpoint(String endpointUri, ServletComponent component, URI httpUri) throws Exception {
-        return new GTaskEndpoint(endpointUri, component, httpUri);
-    }
-
-    @Override
-    public void connect(HttpConsumer consumer) throws Exception {
-        super.connect(consumer);
-    }
-}