public class ServletInitializationParameters
extends java.lang.Object
EndpointsServlet.| Modifier and Type | Class and Description |
|---|---|
static class |
ServletInitializationParameters.Builder
A builder for
ServletInitializationParameters. |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> |
asMap()
Returns the parameters as a
Map of parameter name to String value. |
static ServletInitializationParameters.Builder |
builder()
Returns a new
ServletInitializationParameters.Builder for this class. |
static ServletInitializationParameters |
fromServletConfig(javax.servlet.ServletConfig config,
java.lang.ClassLoader classLoader)
Constructs a new instance from the provided
ServletConfig and ClassLoader. |
com.google.common.collect.ImmutableSet<java.lang.Class<?>> |
getServiceClasses()
Returns the endpoint service classes to serve.
|
boolean |
isClientIdWhitelistEnabled()
Returns
true if client ID whitelisting is enabled. |
boolean |
isExceptionCompatibilityEnabled()
Returns
true if v1.0 style exceptions should be returned to users. |
boolean |
isIllegalArgumentBackendError()
Returns
true if an IllegalArgumentException should be returned as a backend
error (500) instead of a user error (400). |
boolean |
isServletRestricted()
Returns
true if the SPI servlet is restricted. |
public static ServletInitializationParameters.Builder builder()
ServletInitializationParameters.Builder for this class.public static ServletInitializationParameters fromServletConfig(javax.servlet.ServletConfig config, java.lang.ClassLoader classLoader) throws javax.servlet.ServletException
ServletConfig and ClassLoader.javax.servlet.ServletExceptionpublic com.google.common.collect.ImmutableSet<java.lang.Class<?>> getServiceClasses()
public boolean isServletRestricted()
true if the SPI servlet is restricted.public boolean isClientIdWhitelistEnabled()
true if client ID whitelisting is enabled.public boolean isIllegalArgumentBackendError()
true if an IllegalArgumentException should be returned as a backend
error (500) instead of a user error (400).public boolean isExceptionCompatibilityEnabled()
true if v1.0 style exceptions should be returned to users. In v1.0, certain
codes are not permissible, and other codes are translated to other status codes.public com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> asMap()
Map of parameter name to String value.