Class CreditCardProcessorFactory
java.lang.Object
com.aoindustries.aoserv.creditcards.CreditCardProcessorFactory
Creates instances of
CreditCardProcessor
based on the processor
configurations found in ProcessorTable
.
Will only create once instance of each processor. Disabled processors
will not be returned. When multiple processors are enabled for an account,
adheres to the weight provided by the processors.- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CreditCardProcessor
Gets an enabledCreditCardProcessor
from the list of processors for the account of the providedAoservConnector
.static CreditCardProcessor
getCreditCardProcessor
(Processor selectedProcessor) Gets the processor for the given AOServ processor.
Only one instance of each uniqueCreditCardProcessor
(unique based on providerId, classname and all parameters) will be created.
Every processor will use theAoservPersistenceMechanism
for its persistence.
-
Method Details
-
getCreditCardProcessor
public static CreditCardProcessor getCreditCardProcessor(AoservConnector conn) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException, IOException, SQLException Gets an enabledCreditCardProcessor
from the list of processors for the account of the providedAoservConnector
. When multiple processors are enabled, those with a higher weight will be returned more often, proportional to weight. Uses the random source of theAoservConnector
when selecting the processor.
Only one instance of each uniqueCreditCardProcessor
(unique based on providerId, classname and all parameters) will be created.
Every processor will use theAoservPersistenceMechanism
for its persistence.- Returns:
- the processor or
null
if none found - Throws:
ClassNotFoundException
NoSuchMethodException
IllegalAccessException
InstantiationException
InvocationTargetException
IOException
SQLException
-
getCreditCardProcessor
public static CreditCardProcessor getCreditCardProcessor(Processor selectedProcessor) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException Gets the processor for the given AOServ processor.
Only one instance of each uniqueCreditCardProcessor
(unique based on providerId, classname and all parameters) will be created.
Every processor will use theAoservPersistenceMechanism
for its persistence.
-