public final class StaticFilesHandler extends 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 type google.appengine.v1.StaticFilesHandler
Static Fields
APPLICATION_READABLE_FIELD_NUMBER
public static final int APPLICATION_READABLE_FIELD_NUMBER
Field Value
EXPIRATION_FIELD_NUMBER
public static final int EXPIRATION_FIELD_NUMBER
Field Value
HTTP_HEADERS_FIELD_NUMBER
public static final int HTTP_HEADERS_FIELD_NUMBER
Field Value
MIME_TYPE_FIELD_NUMBER
public static final int MIME_TYPE_FIELD_NUMBER
Field Value
PATH_FIELD_NUMBER
public static final int PATH_FIELD_NUMBER
Field Value
REQUIRE_MATCHING_FILE_FIELD_NUMBER
public static final int REQUIRE_MATCHING_FILE_FIELD_NUMBER
Field Value
UPLOAD_PATH_REGEX_FIELD_NUMBER
public static final int UPLOAD_PATH_REGEX_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static StaticFilesHandler getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static StaticFilesHandler.Builder newBuilder()
Returns
newBuilder(StaticFilesHandler prototype)
public static StaticFilesHandler.Builder newBuilder(StaticFilesHandler prototype)
Parameter
Returns
public static StaticFilesHandler parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static StaticFilesHandler parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static StaticFilesHandler parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static StaticFilesHandler parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static StaticFilesHandler parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static StaticFilesHandler parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static StaticFilesHandler parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static StaticFilesHandler parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static StaticFilesHandler parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static StaticFilesHandler parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static StaticFilesHandler parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static StaticFilesHandler parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<StaticFilesHandler> parser()
Returns
Methods
containsHttpHeaders(String key)
public boolean containsHttpHeaders(String key)
HTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;
Parameter
Returns
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
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;
Returns
Type | Description |
boolean | The applicationReadable.
|
getDefaultInstanceForType()
public StaticFilesHandler getDefaultInstanceForType()
Returns
getExpiration()
public Duration getExpiration()
Time a static file served by this handler should be cached
by web proxies and browsers.
.google.protobuf.Duration expiration = 5;
Returns
getExpirationOrBuilder()
public DurationOrBuilder getExpirationOrBuilder()
Time a static file served by this handler should be cached
by web proxies and browsers.
.google.protobuf.Duration expiration = 5;
Returns
getHttpHeaders()
public Map<String,String> getHttpHeaders()
Returns
getHttpHeadersCount()
public int getHttpHeadersCount()
HTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;
Returns
getHttpHeadersMap()
public Map<String,String> getHttpHeadersMap()
HTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;
Returns
getHttpHeadersOrDefault(String key, String defaultValue)
public String getHttpHeadersOrDefault(String key, String defaultValue)
HTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;
Parameters
Returns
getHttpHeadersOrThrow(String key)
public String getHttpHeadersOrThrow(String key)
HTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;
Parameter
Returns
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;
Returns
Type | Description |
String | The mimeType.
|
getMimeTypeBytes()
public 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;
Returns
getParserForType()
public Parser<StaticFilesHandler> getParserForType()
Returns
Overrides
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;
Returns
Type | Description |
String | The path.
|
getPathBytes()
public 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;
Returns
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;
Returns
Type | Description |
boolean | The requireMatchingFile.
|
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
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;
Returns
Type | Description |
String | The uploadPathRegex.
|
getUploadPathRegexBytes()
public ByteString getUploadPathRegexBytes()
Regular expression that matches the file paths for all files that should be
referenced by this handler.
string upload_path_regex = 2;
Returns
Type | Description |
ByteString | The bytes for uploadPathRegex.
|
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;
Returns
Type | Description |
boolean | Whether the expiration field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public StaticFilesHandler.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected StaticFilesHandler.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public StaticFilesHandler.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions