Class AbstractSecurityBuilder<O>

java.lang.Object
org.springframework.security.config.annotation.AbstractSecurityBuilder<O>
Type Parameters:
O - the type of Object that is being built
All Implemented Interfaces:
SecurityBuilder<O>
Direct Known Subclasses:
AbstractConfiguredSecurityBuilder

public abstract class AbstractSecurityBuilder<O> extends Object implements SecurityBuilder<O>
A base SecurityBuilder that ensures the object being built is only built one time.
  • Constructor Details

    • AbstractSecurityBuilder

      public AbstractSecurityBuilder()
  • Method Details

    • build

      public final O build() throws Exception
      Description copied from interface: SecurityBuilder
      Builds the object and returns it or null.
      Specified by:
      build in interface SecurityBuilder<O>
      Returns:
      the Object to be built or null if the implementation allows it.
      Throws:
      Exception - if an error occurred when building the Object
    • getObject

      public final O getObject()
      Gets the object that was built. If it has not been built yet an Exception is thrown.
      Returns:
      the Object that was built
    • doBuild

      protected abstract O doBuild() throws Exception
      Subclasses should implement this to perform the build.
      Returns:
      the object that should be returned by build().
      Throws:
      Exception - if an error occurs