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 class
StaticFilesHandler.Builder
Files 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 int
APPLICATION_READABLE_FIELD_NUMBER
static int
EXPIRATION_FIELD_NUMBER
static int
HTTP_HEADERS_FIELD_NUMBER
static int
MIME_TYPE_FIELD_NUMBER
static int
PATH_FIELD_NUMBER
static int
REQUIRE_MATCHING_FILE_FIELD_NUMBER
static int
UPLOAD_PATH_REGEX_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsHttpHeaders(String key)
HTTP headers to use for all responses from these URLs.boolean
equals(Object obj)
boolean
getApplicationReadable()
Whether files should also be uploaded as code data.static StaticFilesHandler
getDefaultInstance()
StaticFilesHandler
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Duration
getExpiration()
Time a static file served by this handler should be cached by web proxies and browsers.com.google.protobuf.DurationOrBuilder
getExpirationOrBuilder()
Time a static file served by this handler should be cached by web proxies and browsers.Map<String,String>
getHttpHeaders()
Deprecated.int
getHttpHeadersCount()
HTTP headers to use for all responses from these URLs.Map<String,String>
getHttpHeadersMap()
HTTP headers to use for all responses from these URLs.String
getHttpHeadersOrDefault(String key, String defaultValue)
HTTP headers to use for all responses from these URLs.String
getHttpHeadersOrThrow(String key)
HTTP headers to use for all responses from these URLs.String
getMimeType()
MIME type used to serve all files served by this handler.com.google.protobuf.ByteString
getMimeTypeBytes()
MIME type used to serve all files served by this handler.com.google.protobuf.Parser<StaticFilesHandler>
getParserForType()
String
getPath()
Path to the static files matched by the URL pattern, from the application root directory.com.google.protobuf.ByteString
getPathBytes()
Path to the static files matched by the URL pattern, from the application root directory.boolean
getRequireMatchingFile()
Whether this handler should match the request if the file referenced by the handler does not exist.int
getSerializedSize()
String
getUploadPathRegex()
Regular expression that matches the file paths for all files that should be referenced by this handler.com.google.protobuf.ByteString
getUploadPathRegexBytes()
Regular expression that matches the file paths for all files that should be referenced by this handler.boolean
hasExpiration()
Time a static file served by this handler should be cached by web proxies and browsers.int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
boolean
isInitialized()
static StaticFilesHandler.Builder
newBuilder()
static StaticFilesHandler.Builder
newBuilder(StaticFilesHandler prototype)
StaticFilesHandler.Builder
newBuilderForType()
protected StaticFilesHandler.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static StaticFilesHandler
parseDelimitedFrom(InputStream input)
static StaticFilesHandler
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static StaticFilesHandler
parseFrom(byte[] data)
static StaticFilesHandler
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static StaticFilesHandler
parseFrom(com.google.protobuf.ByteString data)
static StaticFilesHandler
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static StaticFilesHandler
parseFrom(com.google.protobuf.CodedInputStream input)
static StaticFilesHandler
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static StaticFilesHandler
parseFrom(InputStream input)
static StaticFilesHandler
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static StaticFilesHandler
parseFrom(ByteBuffer data)
static StaticFilesHandler
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<StaticFilesHandler>
parser()
StaticFilesHandler.Builder
toBuilder()
void
writeTo(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:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in 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:
getPath
in 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:
getPathBytes
in 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:
getUploadPathRegex
in 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:
getUploadPathRegexBytes
in interfaceStaticFilesHandlerOrBuilder
- Returns:
- The bytes for uploadPathRegex.
-
getHttpHeadersCount
public int getHttpHeadersCount()
Description copied from interface:StaticFilesHandlerOrBuilder
HTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;
- Specified by:
getHttpHeadersCount
in 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:
containsHttpHeaders
in interfaceStaticFilesHandlerOrBuilder
-
getHttpHeaders
@Deprecated public Map<String,String> getHttpHeaders()
Deprecated.UsegetHttpHeadersMap()
instead.- Specified by:
getHttpHeaders
in 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:
getHttpHeadersMap
in 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:
getHttpHeadersOrDefault
in 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:
getHttpHeadersOrThrow
in 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:
getMimeType
in 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:
getMimeTypeBytes
in 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:
hasExpiration
in 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:
getExpiration
in 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:
getExpirationOrBuilder
in 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:
getRequireMatchingFile
in 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:
getApplicationReadable
in interfaceStaticFilesHandlerOrBuilder
- Returns:
- The applicationReadable.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in 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:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected StaticFilesHandler.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in 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:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public StaticFilesHandler getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-