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 CreditCardProcessorGets an enabledCreditCardProcessorfrom the list of processors for the account of the providedAoservConnector.static CreditCardProcessorgetCreditCardProcessor(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 theAoservPersistenceMechanismfor its persistence.
-
Method Details
-
getCreditCardProcessor
public static CreditCardProcessor getCreditCardProcessor(AoservConnector conn) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException, IOException, SQLException Gets an enabledCreditCardProcessorfrom 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 theAoservConnectorwhen selecting the processor.
Only one instance of each uniqueCreditCardProcessor(unique based on providerId, classname and all parameters) will be created.
Every processor will use theAoservPersistenceMechanismfor its persistence.- Returns:
- the processor or
nullif none found - Throws:
ClassNotFoundExceptionNoSuchMethodExceptionIllegalAccessExceptionInstantiationExceptionInvocationTargetExceptionIOExceptionSQLException
-
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 theAoservPersistenceMechanismfor its persistence.
-
