Package com.google.appengine.v1
Class StaticFilesHandler
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.appengine.v1.StaticFilesHandler
-
- All Implemented Interfaces:
StaticFilesHandlerOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class StaticFilesHandler extends com.google.protobuf.GeneratedMessageV3 implements StaticFilesHandlerOrBuilder
Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.
Protobuf typegoogle.appengine.v1.StaticFilesHandler- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStaticFilesHandler.BuilderFiles served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intAPPLICATION_READABLE_FIELD_NUMBERstatic intEXPIRATION_FIELD_NUMBERstatic intHTTP_HEADERS_FIELD_NUMBERstatic intMIME_TYPE_FIELD_NUMBERstatic intPATH_FIELD_NUMBERstatic intREQUIRE_MATCHING_FILE_FIELD_NUMBERstatic intUPLOAD_PATH_REGEX_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontainsHttpHeaders(String key)HTTP headers to use for all responses from these URLs.booleanequals(Object obj)booleangetApplicationReadable()Whether files should also be uploaded as code data.static StaticFilesHandlergetDefaultInstance()StaticFilesHandlergetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.DurationgetExpiration()Time a static file served by this handler should be cached by web proxies and browsers.com.google.protobuf.DurationOrBuildergetExpirationOrBuilder()Time a static file served by this handler should be cached by web proxies and browsers.Map<String,String>getHttpHeaders()Deprecated.intgetHttpHeadersCount()HTTP headers to use for all responses from these URLs.Map<String,String>getHttpHeadersMap()HTTP headers to use for all responses from these URLs.StringgetHttpHeadersOrDefault(String key, String defaultValue)HTTP headers to use for all responses from these URLs.StringgetHttpHeadersOrThrow(String key)HTTP headers to use for all responses from these URLs.StringgetMimeType()MIME type used to serve all files served by this handler.com.google.protobuf.ByteStringgetMimeTypeBytes()MIME type used to serve all files served by this handler.com.google.protobuf.Parser<StaticFilesHandler>getParserForType()StringgetPath()Path to the static files matched by the URL pattern, from the application root directory.com.google.protobuf.ByteStringgetPathBytes()Path to the static files matched by the URL pattern, from the application root directory.booleangetRequireMatchingFile()Whether this handler should match the request if the file referenced by the handler does not exist.intgetSerializedSize()StringgetUploadPathRegex()Regular expression that matches the file paths for all files that should be referenced by this handler.com.google.protobuf.ByteStringgetUploadPathRegexBytes()Regular expression that matches the file paths for all files that should be referenced by this handler.booleanhasExpiration()Time a static file served by this handler should be cached by web proxies and browsers.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldinternalGetMapField(int number)booleanisInitialized()static StaticFilesHandler.BuildernewBuilder()static StaticFilesHandler.BuildernewBuilder(StaticFilesHandler prototype)StaticFilesHandler.BuildernewBuilderForType()protected StaticFilesHandler.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static StaticFilesHandlerparseDelimitedFrom(InputStream input)static StaticFilesHandlerparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static StaticFilesHandlerparseFrom(byte[] data)static StaticFilesHandlerparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static StaticFilesHandlerparseFrom(com.google.protobuf.ByteString data)static StaticFilesHandlerparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static StaticFilesHandlerparseFrom(com.google.protobuf.CodedInputStream input)static StaticFilesHandlerparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static StaticFilesHandlerparseFrom(InputStream input)static StaticFilesHandlerparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static StaticFilesHandlerparseFrom(ByteBuffer data)static StaticFilesHandlerparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<StaticFilesHandler>parser()StaticFilesHandler.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
PATH_FIELD_NUMBER
public static final int PATH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
UPLOAD_PATH_REGEX_FIELD_NUMBER
public static final int UPLOAD_PATH_REGEX_FIELD_NUMBER
- See Also:
- Constant Field Values
-
HTTP_HEADERS_FIELD_NUMBER
public static final int HTTP_HEADERS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MIME_TYPE_FIELD_NUMBER
public static final int MIME_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXPIRATION_FIELD_NUMBER
public static final int EXPIRATION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REQUIRE_MATCHING_FILE_FIELD_NUMBER
public static final int REQUIRE_MATCHING_FILE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
APPLICATION_READABLE_FIELD_NUMBER
public static final int APPLICATION_READABLE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getPath
public String getPath()
Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.
string path = 1;- Specified by:
getPathin interfaceStaticFilesHandlerOrBuilder- Returns:
- The path.
-
getPathBytes
public com.google.protobuf.ByteString getPathBytes()
Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.
string path = 1;- Specified by:
getPathBytesin interfaceStaticFilesHandlerOrBuilder- Returns:
- The bytes for path.
-
getUploadPathRegex
public String getUploadPathRegex()
Regular expression that matches the file paths for all files that should be referenced by this handler.
string upload_path_regex = 2;- Specified by:
getUploadPathRegexin interfaceStaticFilesHandlerOrBuilder- Returns:
- The uploadPathRegex.
-
getUploadPathRegexBytes
public com.google.protobuf.ByteString getUploadPathRegexBytes()
Regular expression that matches the file paths for all files that should be referenced by this handler.
string upload_path_regex = 2;- Specified by:
getUploadPathRegexBytesin interfaceStaticFilesHandlerOrBuilder- Returns:
- The bytes for uploadPathRegex.
-
getHttpHeadersCount
public int getHttpHeadersCount()
Description copied from interface:StaticFilesHandlerOrBuilderHTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;- Specified by:
getHttpHeadersCountin interfaceStaticFilesHandlerOrBuilder
-
containsHttpHeaders
public boolean containsHttpHeaders(String key)
HTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;- Specified by:
containsHttpHeadersin interfaceStaticFilesHandlerOrBuilder
-
getHttpHeaders
@Deprecated public Map<String,String> getHttpHeaders()
Deprecated.UsegetHttpHeadersMap()instead.- Specified by:
getHttpHeadersin interfaceStaticFilesHandlerOrBuilder
-
getHttpHeadersMap
public Map<String,String> getHttpHeadersMap()
HTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;- Specified by:
getHttpHeadersMapin interfaceStaticFilesHandlerOrBuilder
-
getHttpHeadersOrDefault
public String getHttpHeadersOrDefault(String key, String defaultValue)
HTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;- Specified by:
getHttpHeadersOrDefaultin interfaceStaticFilesHandlerOrBuilder
-
getHttpHeadersOrThrow
public String getHttpHeadersOrThrow(String key)
HTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;- Specified by:
getHttpHeadersOrThrowin interfaceStaticFilesHandlerOrBuilder
-
getMimeType
public String getMimeType()
MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension.
string mime_type = 4;- Specified by:
getMimeTypein interfaceStaticFilesHandlerOrBuilder- Returns:
- The mimeType.
-
getMimeTypeBytes
public com.google.protobuf.ByteString getMimeTypeBytes()
MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension.
string mime_type = 4;- Specified by:
getMimeTypeBytesin interfaceStaticFilesHandlerOrBuilder- Returns:
- The bytes for mimeType.
-
hasExpiration
public boolean hasExpiration()
Time a static file served by this handler should be cached by web proxies and browsers.
.google.protobuf.Duration expiration = 5;- Specified by:
hasExpirationin interfaceStaticFilesHandlerOrBuilder- Returns:
- Whether the expiration field is set.
-
getExpiration
public com.google.protobuf.Duration getExpiration()
Time a static file served by this handler should be cached by web proxies and browsers.
.google.protobuf.Duration expiration = 5;- Specified by:
getExpirationin interfaceStaticFilesHandlerOrBuilder- Returns:
- The expiration.
-
getExpirationOrBuilder
public com.google.protobuf.DurationOrBuilder getExpirationOrBuilder()
Time a static file served by this handler should be cached by web proxies and browsers.
.google.protobuf.Duration expiration = 5;- Specified by:
getExpirationOrBuilderin interfaceStaticFilesHandlerOrBuilder
-
getRequireMatchingFile
public boolean getRequireMatchingFile()
Whether this handler should match the request if the file referenced by the handler does not exist.
bool require_matching_file = 6;- Specified by:
getRequireMatchingFilein interfaceStaticFilesHandlerOrBuilder- Returns:
- The requireMatchingFile.
-
getApplicationReadable
public boolean getApplicationReadable()
Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.
bool application_readable = 7;- Specified by:
getApplicationReadablein interfaceStaticFilesHandlerOrBuilder- Returns:
- The applicationReadable.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static StaticFilesHandler parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static StaticFilesHandler parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static StaticFilesHandler parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static StaticFilesHandler parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static StaticFilesHandler parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static StaticFilesHandler parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static StaticFilesHandler parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static StaticFilesHandler parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static StaticFilesHandler parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static StaticFilesHandler parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static StaticFilesHandler parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static StaticFilesHandler parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public StaticFilesHandler.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static StaticFilesHandler.Builder newBuilder()
-
newBuilder
public static StaticFilesHandler.Builder newBuilder(StaticFilesHandler prototype)
-
toBuilder
public StaticFilesHandler.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected StaticFilesHandler.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static StaticFilesHandler getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<StaticFilesHandler> parser()
-
getParserForType
public com.google.protobuf.Parser<StaticFilesHandler> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public StaticFilesHandler getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-