B
- the type of the Builder itselfT
- the type being built by the AbstractAuthenticationRequest.AbstractBuilder.build()
method of this builder.@NotThreadSafe public abstract static class AbstractEidasAuthenticationRequest.AbstractBuilder<B extends AbstractEidasAuthenticationRequest.AbstractBuilder<B,T>,T extends IEidasAuthenticationRequest> extends AbstractAuthenticationRequest.AbstractBuilder<B,T>
IEidasAuthenticationRequest
subtypes.
Effective Java, 2nd Ed. : Item 2: Builder Pattern.
This Builder is not thread-safe but is thread-compliant, it is supposed to be used by only one thread.
See Self-bounding generics:
http://www.artima.com/weblogs/viewpost.jsp?thread=136394
http://www.artima.com/forums/flat.jsp?forum=106&thread=136394
http://en.wikipedia.org/wiki/Covariance_and_contravariance
Modifier | Constructor and Description |
---|---|
protected |
AbstractBuilder() |
protected |
AbstractBuilder(AbstractEidasAuthenticationRequest.AbstractBuilder<?,?> copy) |
protected |
AbstractBuilder(IEidasAuthenticationRequest copy) |
Modifier and Type | Method and Description |
---|---|
B |
levelOfAssurance(NotifiedLevelOfAssurance levelOfAssurance) |
B |
levelOfAssuranceComparison(LevelOfAssuranceComparison levelOfAssuranceComparison) |
B |
levelOfAssuranceComparison(String levelOfAssuranceComparison) |
protected void |
validate()
Validates the state of this Builder before allowing to create new instances of the built type
T . |
protected abstract void |
validateOtherFields()
Validates the state of this Builder before allowing to create new instances of the built type
T . |
assertionConsumerServiceURL, binding, build, citizenCountryCode, destination, id, issuer, levelOfAssurance, levelsOfAssurance, lightRequest, nameIdFormat, newInstance, originalIssuer, originCountryCode, providerName, relayState, requestedAttributes, requesterId, serviceProviderCountryCode, spCountryCode, spType
protected AbstractBuilder()
protected AbstractBuilder(@Nonnull AbstractEidasAuthenticationRequest.AbstractBuilder<?,?> copy)
protected AbstractBuilder(@Nonnull IEidasAuthenticationRequest copy)
@Nonnull public final B levelOfAssurance(@Nonnull NotifiedLevelOfAssurance levelOfAssurance)
@Nonnull public final B levelOfAssuranceComparison(LevelOfAssuranceComparison levelOfAssuranceComparison)
@Nonnull public final B levelOfAssuranceComparison(String levelOfAssuranceComparison)
protected final void validate() throws IllegalArgumentException
T
.validate
in class AbstractAuthenticationRequest.AbstractBuilder<B extends AbstractEidasAuthenticationRequest.AbstractBuilder<B,T>,T extends IEidasAuthenticationRequest>
IllegalArgumentException
- if the builder is not in a legal state allowing to proceed with the creation
of a T
instance.protected abstract void validateOtherFields() throws IllegalArgumentException
T
.IllegalArgumentException
- if the builder is not in a legal state allowing to proceed with the creation
of a T
instance.Copyright © 2020. All Rights Reserved.