Package org.wildfly.discovery
Class ServiceURL.Builder
java.lang.Object
org.wildfly.discovery.ServiceURL.Builder
- Enclosing class:
- ServiceURL
A builder for service URLs.
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()Construct a new instance.Builder(ServiceURL original) Construct a new instance from an original template. -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute(String name) Add a valueless attribute.addAttribute(String name, AttributeValue value) Add an attribute.create()Construct the service URL.Get the abstract type.Get the abstract type authority.getUri()Get the concrete URI.Get the URI scheme authority, if any.removeAttribute(String name) Remove all values of the given attribute name.booleanremoveAttributeValue(String name, AttributeValue value) Remove the given value of the given attribute name.setAbstractType(String abstractType) Set the abstract type.setAbstractTypeAuthority(String abstractTypeAuthority) Set the abstract authority.Set the concrete URI.setUriSchemeAuthority(String uriSchemeAuthority) Set the URI scheme authority.
-
Constructor Details
-
Builder
public Builder()Construct a new instance. -
Builder
Construct a new instance from an original template.- Parameters:
original- the original service URL (must not benull)
-
-
Method Details
-
getAbstractType
Get the abstract type.- Returns:
- the abstract type, or
nullif it is not set
-
setAbstractType
Set the abstract type.- Parameters:
abstractType- the abstract type- Returns:
- this builder
-
getAbstractTypeAuthority
Get the abstract type authority.- Returns:
- the abstract type authority, or
nullif it is not set
-
setAbstractTypeAuthority
Set the abstract authority.- Parameters:
abstractTypeAuthority- the abstract authority- Returns:
- this builder
-
getUri
Get the concrete URI.- Returns:
- the concrete URI
-
setUri
Set the concrete URI.- Parameters:
uri- the concrete URI (must not benull)- Returns:
- this builder
-
getUriSchemeAuthority
Get the URI scheme authority, if any.- Returns:
- the URI scheme authority, or
nullif none is set
-
setUriSchemeAuthority
Set the URI scheme authority.- Parameters:
uriSchemeAuthority- the URI scheme authority- Returns:
- this builder
-
addAttribute
Add an attribute.- Parameters:
name- the attribute name (must not benull)value- the attribute value (must not benull)- Returns:
- this builder
-
addAttribute
Add a valueless attribute.- Parameters:
name- the attribute name (must not benull)- Returns:
- this builder
-
removeAttribute
Remove all values of the given attribute name.- Parameters:
name- the attribute name (must not benull)- Returns:
- the removed attribute values, or
nullif the attribute was not present in the builder
-
removeAttributeValue
Remove the given value of the given attribute name.- Parameters:
name- the attribute name (must not benull)value- the value to remove (must not benull)- Returns:
trueif the value was present, orfalseotherwise
-
create
Construct the service URL.- Returns:
- the service URL
- Throws:
IllegalArgumentException- if one or more builder property values is not acceptable
-