com.threewks.thundr.gae.HeaderGae Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of thundr-gae Show documentation
Show all versions of thundr-gae Show documentation
A thundr module enabling thundr for use on GAE (Google App Engine)
The newest version!
/*
* This file is a component of thundr, a software library from 3wks.
* Read more: http://3wks.github.io/thundr/
* Copyright (C) 2015 3wks,
*
* Licensed 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 com.threewks.thundr.gae;
/**
* Appengine specific headers, documented here.
*/
public class HeaderGae {
/** Requests from the Cron Service will also contain a HTTP header, with a value of true */
public static final String XAppengineCron = "X-Appengine-Cron";
/**
* The name of the queue (possibly "default" for the default push queue).
*
*
* Documented at
* https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#
* reading_request_headers
*/
public static final String XAppEngineQueueName = "X-AppEngine-QueueName";
/**
* The name of the task, or a system-generated unique ID if no name was specified.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#
* reading_request_headers
*/
public static final String XAppEngineTaskName = "X-AppEngine-TaskName";
/**
* The number of times this task has been retried. For the first attempt, this value is 0. This number includes attempts where the task failed due to a lack of available instances and never
* reached the execution phase.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#
* reading_request_headers
*/
public static final String XAppEngineTaskRetryCount = "X-AppEngine-TaskRetryCount";
/**
* The number of times this task has previously failed during the execution phase. This number does not include failures due to a lack of available instances.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#
* reading_request_headers
*/
public static final String XAppEngineTaskExecutionCount = "X-AppEngine-TaskExecutionCount";
/**
* The target execution time of the task, specified in seconds since January 1st 1970.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#
* reading_request_headers
*/
public static final String XAppEngineTaskETA = "X-AppEngine-TaskETA";
/**
* Indicates that a task running on a manual or basic scaled module fails immediately instead of waiting in a pending queue.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#
* reading_request_headers
*/
public static final String XAppEngineFailFast = "X-AppEngine-FailFast";
/**
* Country from which the request originated, as an ISO 3166-1 alpha-2 country code. App Engine determines this code from the client's IP address. Note that the country information is not derived
* from the WHOIS database; it's possible that an IP address with country information in the WHOIS database will not have country information in the X-AppEngine-Country header. Your application
* should handle the special country code ZZ (unknown country).
*
* Documented at
* https://cloud.google.com/appengine/docs/java/how-requests-are-handled#app-engine-
* specific-headers
*/
public static final String XAppEngineCountry = "X-AppEngine-Country";
/**
* Name of region from which the request originated. This value only makes sense in the context of the country in X-AppEngine-Country. For example, if the country is "US" and the region is "ca",
* that "ca" means "California", not Canada. The complete list of valid region values is found in the ISO-3166-2 standard.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/how-requests-are-handled#app-engine-
* specific-headers
*/
public static final String XAppEngineRegion = "X-AppEngine-Region";
/**
* Name of the city from which the request originated. For example, a request from the city of Mountain View might have the header value mountain view. There is no canonical list of valid values
* for this header.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/how-requests-are-handled#app-engine-
* specific-headers
*/
public static final String XAppEngineCity = "X-AppEngine-City";
/**
* Latitude and longitude of the city from which the request originated. This string might look like "37.386051,-122.083851" for a request from Mountain View.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/how-requests-are-handled#app-engine-
* specific-headers
*/
public static final String XAppEngineCityLatLong = "X-AppEngine-CityLatLong";
/**
* Requests coming from other App Engine applications will include a header identifying the app making the request:
*
* Documented at
* https://cloud.google.com/appengine/docs/java/how-requests-are-handled#app-engine-
* specific-headers
*/
public static final String XAppengineInboundAppid = "X-Appengine-Inbound-Appid";
/**
* An estimate of what 1,000 requests similar to this request would cost in US dollars.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/how-requests-are-handled#
* headers_added_or_replaced
*/
public static final String XAppEngineEstimatedCPMUSDollars = "X-AppEngine-Estimated-CPM-US-Dollars";
/**
* The resources used by the request, including server-side time as a number of milliseconds.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/how-requests-are-handled#
* headers_added_or_replaced
*/
public static final String XAppEngineResourceUsage = "X-AppEngine-Resource-Usage";
/**
* If the X-AppEngine-BlobKey header is in the application's response, it and the optional X-AppEngine-BlobRange header will be used to replace the body with all or part of a blobstore blob's
* content. If Content-Type is not specified by the application, it will be set to the blob's MIME type. If a range is requested, the response status will be changed to 206 Partial Content, and a
* Content-Range header will be added. The X-AppEngine-BlobKey and X-AppEngine-BlobRange headers will be removed from the response. You do not normally need to set these headers yourself, as the
* blobstore_handlers.BlobstoreDownloadHandler class sets them. See Serving a Blob for details.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/how-requests-are-handled#
* headers_added_or_replaced
*/
public static final String XAppEngineBlobKey = "X-AppEngine-BlobKey";
/**
* If the X-AppEngine-BlobKey header is in the application's response, it and the optional X-AppEngine-BlobRange header will be used to replace the body with all or part of a blobstore blob's
* content. If Content-Type is not specified by the application, it will be set to the blob's MIME type. If a range is requested, the response status will be changed to 206 Partial Content, and a
* Content-Range header will be added. The X-AppEngine-BlobKey and X-AppEngine-BlobRange headers will be removed from the response. You do not normally need to set these headers yourself, as the
* blobstore_handlers.BlobstoreDownloadHandler class sets them. See Serving a Blob for details.
*
* Documented at
* https://cloud.google.com/appengine/docs/java/how-requests-are-handled#
* headers_added_or_replaced
*/
public static final String XAppEngineBlobRange = "X-AppEngine-BlobRange";
}