Class ImmutableCamelScheme.Builder
- java.lang.Object
-
- org.apache.camel.k.tooling.maven.model.ImmutableCamelScheme.Builder
-
- Direct Known Subclasses:
CamelScheme.Builder
- Enclosing class:
- ImmutableCamelScheme
public static class ImmutableCamelScheme.Builder extends Object
Builds instances of typeImmutableCamelScheme. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates a builder forImmutableCamelSchemeinstances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableCamelSchemebuild()Builds a newImmutableCamelScheme.CamelScheme.Builderfrom(CamelScheme instance)Fill a builder with attribute values from the providedCamelSchemeinstance.CamelScheme.Builderhttp(boolean http)Initializes the value for thehttpattribute.CamelScheme.Builderid(String id)Initializes the value for theidattribute.CamelScheme.Builderpassive(boolean passive)Initializes the value for thepassiveattribute.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a builder forImmutableCamelSchemeinstances.new CamelScheme.Builder() .id(String) // requiredid.http(boolean) // optionalhttp.passive(boolean) // optionalpassive.build();
-
-
Method Detail
-
from
public final CamelScheme.Builder from(CamelScheme instance)
Fill a builder with attribute values from the providedCamelSchemeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
public final CamelScheme.Builder id(String id)
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
http
public final CamelScheme.Builder http(boolean http)
Initializes the value for thehttpattribute.If not set, this attribute will have a default value as returned by the initializer of
http.- Parameters:
http- The value for http- Returns:
thisbuilder for use in a chained invocation
-
passive
public final CamelScheme.Builder passive(boolean passive)
Initializes the value for thepassiveattribute.If not set, this attribute will have a default value as returned by the initializer of
passive.- Parameters:
passive- The value for passive- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableCamelScheme build()
Builds a newImmutableCamelScheme.- Returns:
- An immutable instance of CamelScheme
- Throws:
IllegalStateException- if any required attributes are missing
-
-