Class AbstractHttpSecuritySource<A,AC extends java.io.Serializable,C,O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- java.lang.Object
-
- net.officefloor.web.spi.security.impl.AbstractHttpSecuritySource<A,AC,C,O,F>
-
- All Implemented Interfaces:
HttpSecuritySource<A,AC,C,O,F>
- Direct Known Subclasses:
AbstractMockHttpSecuritySource
,AnonymousHttpSecuritySource
,BasicHttpSecuritySource
,DigestHttpSecuritySource
,FormHttpSecuritySource
,JwtHttpSecuritySource
,MockChallengeHttpSecuritySource
,MockFlowHttpSecuritySource
public abstract class AbstractHttpSecuritySource<A,AC extends java.io.Serializable,C,O extends java.lang.Enum<O>,F extends java.lang.Enum<F>> extends java.lang.Object implements HttpSecuritySource<A,AC,C,O,F>
AbstractHttpSecuritySource
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractHttpSecuritySource.DependencyLabeller
ProvideAbstractHttpSecuritySource.Labeller
functionality along with qualifying type of dependency.static interface
AbstractHttpSecuritySource.Labeller
Provides the ability to label the required dependency orFlow
.static interface
AbstractHttpSecuritySource.MetaDataContext<A,AC extends java.io.Serializable,C,O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
Context for theHttpSecuritySource.init(HttpSecuritySourceContext)
.static interface
AbstractHttpSecuritySource.SpecificationContext
Context for theHttpSecuritySource.getSpecification()
.
-
Field Summary
Fields Modifier and Type Field Description static java.nio.charset.Charset
UTF_8
UTF-8Charset
.
-
Constructor Summary
Constructors Constructor Description AbstractHttpSecuritySource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description HttpSecuritySourceSpecification
getSpecification()
Obtains the specification for this.HttpSecuritySourceMetaData<A,AC,C,O,F>
init(HttpSecuritySourceContext context)
Initialises theHttpSecuritySource
.protected abstract void
loadMetaData(AbstractHttpSecuritySource.MetaDataContext<A,AC,C,O,F> context)
Overridden to load meta-data.protected abstract void
loadSpecification(AbstractHttpSecuritySource.SpecificationContext context)
Overridden to load specifications.void
start(HttpSecurityExecuteContext<F> context)
Called once afterHttpSecuritySource.init(HttpSecuritySourceContext)
to indicate thisHttpSecuritySource
should start execution.void
stop()
Called to notify that theOfficeFloor
is being closed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.web.spi.security.HttpSecuritySource
sourceHttpSecurity
-
-
-
-
Method Detail
-
getSpecification
public HttpSecuritySourceSpecification getSpecification()
Description copied from interface:HttpSecuritySource
Obtains the specification for this.
This will be called before any other methods, therefore this method must be able to return the specification immediately after a default constructor instantiation.
- Specified by:
getSpecification
in interfaceHttpSecuritySource<A,AC extends java.io.Serializable,C,O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Returns:
- Specification of this.
-
loadSpecification
protected abstract void loadSpecification(AbstractHttpSecuritySource.SpecificationContext context)
Overridden to load specifications.- Parameters:
context
- Specifications.
-
init
public HttpSecuritySourceMetaData<A,AC,C,O,F> init(HttpSecuritySourceContext context) throws java.lang.Exception
Description copied from interface:HttpSecuritySource
Initialises theHttpSecuritySource
.- Specified by:
init
in interfaceHttpSecuritySource<A,AC extends java.io.Serializable,C,O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Parameters:
context
-HttpSecuritySourceContext
to use in initialising.- Returns:
- Meta-data to describe this.
- Throws:
java.lang.Exception
- Should theHttpSecuritySource
fail to configure itself from the input properties.
-
loadMetaData
protected abstract void loadMetaData(AbstractHttpSecuritySource.MetaDataContext<A,AC,C,O,F> context) throws java.lang.Exception
Overridden to load meta-data.- Parameters:
context
- Meta-data.- Throws:
java.lang.Exception
- If fails to load the meta-data.
-
start
public void start(HttpSecurityExecuteContext<F> context) throws java.lang.Exception
Description copied from interface:HttpSecuritySource
Called once after
HttpSecuritySource.init(HttpSecuritySourceContext)
to indicate thisHttpSecuritySource
should start execution.On invocation of this method,
ProcessState
instances may be invoked via theHttpSecurityExecuteContext
.- Specified by:
start
in interfaceHttpSecuritySource<A,AC extends java.io.Serializable,C,O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- Parameters:
context
-HttpSecurityExecuteContext
to use in starting thisHttpSecuritySource
.- Throws:
java.lang.Exception
- Should theHttpSecuritySource
fail to start execution.
-
stop
public void stop()
Description copied from interface:HttpSecuritySource
Called to notify that the
OfficeFloor
is being closed.On return from this method, no further
ProcessState
instances may be invoked.
-
-