Package org.opendaylight.aaa.web
Class ServletDetails.Builder
java.lang.Object
org.opendaylight.aaa.web.ServletDetails.Builder
- Enclosing interface:
- ServletDetails
Builds instances of type
ServletDetails. Initialize attributes and then invoke the
build() method to create an immutable instance.
ServletDetails.Builder is not thread-safe and generally should not be stored in a field or
collection, but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescription@NonNull ServletDetails.BuilderaddUrlPattern(String urlPattern) Adds one element tourlPatternslist.@NonNull ServletDetails.BuilderasyncSupported(boolean asyncSupported) Initializes the value for theasyncSupportedattribute.@NonNull ServletDetailsbuild()Builds a newServletDetails.@NonNull ServletDetails.BuilderInitializes the value for thenameattribute.@NonNull ServletDetails.BuilderputInitParam(String key, String value) Put one entry to theinitParamsmap.@NonNull ServletDetails.Builderservlet(javax.servlet.Servlet servlet) Initializes the value for theservletattribute.
-
Method Details
-
servlet
Initializes the value for theservletattribute.- Parameters:
servlet- The value for servlet- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.If not set, this attribute will have a value corresponding to
servlet().getClass().getName().- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation- Throws:
NullPointerException- if {code name} isnull
-
addUrlPattern
Adds one element tourlPatternslist.- Parameters:
urlPattern- A urlPatterns element- Returns:
thisbuilder for use in a chained invocation- Throws:
NullPointerException- if {code urlPattern} isnullIllegalArgumentException- ifurlPatterndoes not meet specification criteria
-
putInitParam
Put one entry to theinitParamsmap.- Parameters:
key- The key in the initParams mapvalue- The associated value in the initParams map- Returns:
thisbuilder for use in a chained invocation- Throws:
NullPointerException- if any argument isnull
-
asyncSupported
Initializes the value for theasyncSupportedattribute.If not set, this attribute will have a default value of
false.- Parameters:
asyncSupported- The value for asyncSupported- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newServletDetails.- Returns:
- An immutable instance of ServletDetails
- Throws:
IllegalStateException- if any required attributes are missing
-