Package io.helidon.common.configurable
Class ResourceConfig.BuilderBase<BUILDER extends ResourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ResourceConfig>
java.lang.Object
io.helidon.common.configurable.ResourceConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> Prototype.ConfiguredBuilder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
ResourceConfig.Builder
- Enclosing interface:
ResourceConfig
public abstract static class ResourceConfig.BuilderBase<BUILDER extends ResourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ResourceConfig>
extends Object
implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
Resource
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.clearUri()
Clear existing value of this property.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).content()
Binary content of the resource (base64 encoded).Binary content of the resource (base64 encoded).Plain content of the resource (text).contentPlain
(String contentPlain) Plain content of the resource (text).Description of this resource when configured through plain text or binary.description
(String description) Description of this resource when configured through plain text or binary.from
(ResourceConfig prototype) Update this builder from an existing prototype instance.from
(ResourceConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.path()
Resource is located on filesystem.Resource is located on filesystem.protected void
Handles providers and decorators.proxy()
Proxy to use when using uri.Proxy to use when using uri.Host of the proxy when using URI.int
Port of the proxy when using URI.Resource is located on classpath.resourcePath
(String resourcePath) Resource is located on classpath.toString()
uri()
Resource is available on aURI
.Resource is available on aURI
.boolean
useProxy()
Whether to use proxy.protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfacePrototype.ConfiguredBuilder<BUILDER extends ResourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends ResourceConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
clearResourcePath
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
resourcePath
Resource is located on classpath.- Parameters:
resourcePath
- classpath location of the resource- Returns:
- updated builder instance
- See Also:
-
clearPath
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
path
Resource is located on filesystem.- Parameters:
path
- path of the resource- Returns:
- updated builder instance
- See Also:
-
clearContentPlain
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
contentPlain
Plain content of the resource (text).- Parameters:
contentPlain
- plain content- Returns:
- updated builder instance
- See Also:
-
clearContent
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
content
Binary content of the resource (base64 encoded).- Parameters:
content
- binary content- Returns:
- updated builder instance
- See Also:
-
clearUri
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
uri
Resource is available on aURI
.- Parameters:
uri
- of the resource- Returns:
- updated builder instance
- See Also:
-
clearProxy
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
proxy
Proxy to use when using uri.- Parameters:
proxy
- proxy- Returns:
- updated builder instance
- See Also:
-
description
Description of this resource when configured through plain text or binary.- Parameters:
description
- description- Returns:
- updated builder instance
- See Also:
-
resourcePath
Resource is located on classpath.- Returns:
- the resource path
-
path
Resource is located on filesystem.- Returns:
- the path
-
contentPlain
Plain content of the resource (text).- Returns:
- the content plain
-
content
Binary content of the resource (base64 encoded).- Returns:
- the content
-
uri
Resource is available on aURI
.- Returns:
- the uri
- See Also:
-
proxyHost
Host of the proxy when using URI.- Returns:
- the proxy host
-
proxyPort
public int proxyPort()Port of the proxy when using URI.- Returns:
- the proxy port
-
useProxy
public boolean useProxy()Whether to use proxy. If set tofalse
, proxy will not be used even if configured. When set totrue
(default), proxy will be used if configured.- Returns:
- the use proxy
-
proxy
Proxy to use when using uri.- Returns:
- the proxy
-
description
Description of this resource when configured through plain text or binary.- Returns:
- the description
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-