Package org.wildfly.security
Class OneTimeSecurityFactory<T>
java.lang.Object
org.wildfly.security.OneTimeSecurityFactory<T>
- All Implemented Interfaces:
SecurityFactory<T>
A
SecurityFactory implementation which calls delegated factory at first and
returns created object for any other create call. Thread safe.- Author:
- David M. Lloyd
-
Constructor Summary
ConstructorsConstructorDescriptionOneTimeSecurityFactory(SecurityFactory<T> factory) Creates a new factory instance. -
Method Summary
-
Constructor Details
-
OneTimeSecurityFactory
Creates a new factory instance.- Parameters:
factory- a security factory to use to obtain object which should be returned by this factory every time
-
-
Method Details
-
create
Description copied from interface:SecurityFactoryCreate an instance.- Specified by:
createin interfaceSecurityFactory<T>- Returns:
- the new instance
- Throws:
GeneralSecurityException- if instantiation fails for some reason
-