Package org.wildfly.security
Class FixedSecurityFactory<T>
- java.lang.Object
-
- org.wildfly.security.FixedSecurityFactory<T>
-
- All Implemented Interfaces:
SecurityFactory<T>
public final class FixedSecurityFactory<T> extends Object implements SecurityFactory<T>
ASecurityFactory
implementation which returns specified object every time.- Author:
- David M. Lloyd
-
-
Constructor Summary
Constructors Constructor Description FixedSecurityFactory(T value)
Creates a new factory instance.
-
-
-
Field Detail
-
value
private final T value
-
-
Constructor Detail
-
FixedSecurityFactory
public FixedSecurityFactory(T value)
Creates a new factory instance.- Parameters:
value
- the value to be returned on create
-
-
Method Detail
-
create
public T create() throws GeneralSecurityException
Description copied from interface:SecurityFactory
Create an instance.- Specified by:
create
in interfaceSecurityFactory<T>
- Returns:
- the new instance
- Throws:
GeneralSecurityException
- if instantiation fails for some reason
-
-