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.Builder
addUrlPattern
(String urlPattern) Adds one element tourlPatterns
list.@NonNull ServletDetails.Builder
asyncSupported
(boolean asyncSupported) Initializes the value for theasyncSupported
attribute.@NonNull ServletDetails
build()
Builds a newServletDetails
.@NonNull ServletDetails.Builder
Initializes the value for thename
attribute.@NonNull ServletDetails.Builder
putInitParam
(String key, String value) Put one entry to theinitParams
map.@NonNull ServletDetails.Builder
servlet
(javax.servlet.Servlet servlet) Initializes the value for theservlet
attribute.
-
Method Details
-
servlet
Initializes the value for theservlet
attribute.- Parameters:
servlet
- The value for servlet- Returns:
this
builder for use in a chained invocation
-
name
Initializes the value for thename
attribute.If not set, this attribute will have a value corresponding to
servlet().getClass().getName()
.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation- Throws:
NullPointerException
- if {code name} isnull
-
addUrlPattern
Adds one element tourlPatterns
list.- Parameters:
urlPattern
- A urlPatterns element- Returns:
this
builder for use in a chained invocation- Throws:
NullPointerException
- if {code urlPattern} isnull
IllegalArgumentException
- ifurlPattern
does not meet specification criteria
-
putInitParam
Put one entry to theinitParams
map.- Parameters:
key
- The key in the initParams mapvalue
- The associated value in the initParams map- Returns:
this
builder for use in a chained invocation- Throws:
NullPointerException
- if any argument isnull
-
asyncSupported
Initializes the value for theasyncSupported
attribute.If not set, this attribute will have a default value of
false
.- Parameters:
asyncSupported
- The value for asyncSupported- Returns:
this
builder for use in a chained invocation
-
build
Builds a newServletDetails
.- Returns:
- An immutable instance of ServletDetails
- Throws:
IllegalStateException
- if any required attributes are missing
-