|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etill.framework.supervisor.Supervisor
Supervisor provides various services to cassettes through a set of class methods. Since this class only contains static methods and no instance variables, it is never actually instantiated.
Constructor Summary | |
---|---|
Supervisor()
Cassettes should never call this constructor. |
Method Summary | |
---|---|
static void |
addItemToServiceQueue(WorkItem item)
Adds a work item to the Framework's service thread queue. |
static void |
addItemToTimerQueue(TimeableTransaction item)
Adds a work item to the Framework's timer thread queue. |
static Hashtable |
batchesForAccount(String merchantNumber,
String paymentType,
String accountNumber)
Returns a Hashtable of all the open batches that exist for the specified account. |
static Batch |
createBatch(String merchantNumber,
String accountNumber,
String paymentType)
Creates a new batch with a system-generated batch number. |
static Batch |
createBatch(String merchantNumber,
String accountNumber,
String batchNumber,
String paymentType,
ParameterTable protocolData)
Creates a new Batch object using the specified batch number. |
static Credit |
createCredit(Order order,
String creditnumber,
Amount amount,
ParameterTable protocolData)
Creates a new Credit object. |
static Payment |
createPayment(Order order,
String paymentnumber,
Amount amount,
ParameterTable protocolData)
Creates a new Payment object. |
static Cassette |
getCassette(String paymentSystem)
Returns the cassette object for the specified payment system. |
static String |
getExponentForCurrency(String currency)
|
static CommitPoint |
getThreadCommitPoint()
Returns the current thread's CommitPoint object. |
static Timestamp |
getTimestamp(long date)
Returns the actual time and date in a timestamp SQL object. |
static String |
getUniqueKey()
Generates a unique key value for use as a database record primary key. |
static void |
loadLibrary(String libName)
Loads the specified native library into storage according to the needs of the underlying operating system. |
static void |
pruneOrder(Order order)
Prunes an order from the in-storage cache and the database. |
static void |
pruneOrder(Order order,
CommitPoint commitPoint)
Prunes an order from the in-storage cache and the database. |
static void |
pruneOrders(String merchantNumber,
Enumeration orders)
Prunes a set of orders from the in-storage cache and the database. |
static void |
releaseOrder(Order order)
Deprecated. Included for compatibility with 1.2. No-op in 2.1. |
static void |
removeBatch(Batch batch)
Removes the Batch object from the in-storage cache. |
static void |
removeItemFromTimerQueue(TimeableTransaction item)
Removes a work item from the Framework's timer thread queue. |
static void |
removeOrder(Order order)
Removes the Order object from the in-storage cache. |
static Batch |
retrieveBatch(String merchantNumber,
String batchNumber)
Retrieves the specified batch object from the database and places it in the in-memory Batch cache. |
static Order |
retrieveOrder(String merchantNumber,
String orderNumber)
Retrieves the specified order from the cache or database. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Supervisor()
Method Detail |
public static String getUniqueKey()
ETillArchive.createBinaryField
method.ETillArchive.createBinaryField(byte[], java.lang.String, java.sql.Connection)
public static Payment createPayment(Order order, String paymentnumber, Amount amount, ParameterTable protocolData) throws ETillAbortOperation
order
- the Order object to which the payment will belong.paymentNumber
- a String containing the Payment number (must be
unique within this order).amount
- an Amount object containing the authorization
amount, exponent, and currency code.protocolData
- a ParameterTable containing protocol-specific
key/value pairsETillAbortOperation
- thrown if payment creation failed. Use the
primary and secondary return codes in the
exception object to determine the cause.Payment
public static Credit createCredit(Order order, String creditnumber, Amount amount, ParameterTable protocolData) throws ETillAbortOperation
order
- the Order object to which the credit will belong.creditNumber
- a String containing the Credit number (must
be unique within this order).amount
- an Amount object containing the credit
amount, exponent, and currency code.protocolData
- a ParameterTable containing protocol-specific
key/value pairsETillAbortOperation
- thrown if credit creation failed. Use the
primary and secondary return codes in the
exception object to determine the cause.Credit
public static Batch createBatch(String merchantNumber, String accountNumber, String paymentType) throws ETillAbortOperation
merchantNumber
- a String containing the merchant number of
the merchant for which this batch is being created.accountNumber
- a String containing the account number of
the account under which the batch is being created.paymentType
- a String that identifies the payment protocol
associated with this batch. This is actually
the name of the cassette that will handle the
batch.ETillAbortOperation
- thrown if Batch creation failed. Use the
primary and secondary return codes in the
exception object to determine the cause.Batch
public static Batch createBatch(String merchantNumber, String accountNumber, String batchNumber, String paymentType, ParameterTable protocolData) throws ETillAbortOperation
merchantNumber
- a String containing the merchant number of
the merchant for which this batch is being created.accountNumber
- a String containing the account number of
the account under which the batch is being created.batchNumber
- a String containing the batch number to assign
to the batch (must be unique within the Payment
Server instance).paymentType
- a String that identifies the payment protocol
associated with this batch. This is actually
the name of the cassette.protocolData
- a ParameterTable containing the protocol-specific
parmeters passed on the API command that caused
that batch to be created.ETillAbortOperation
- thrown if Batch creation failed. Use the
primary and secondary return codes in the
exception object to determine the cause.Batch
public static void removeBatch(Batch batch)
batch
- the Batch object to remove.public static Batch retrieveBatch(String merchantNumber, String batchNumber) throws ETillAbortOperation
merchantNumber
- a String containing the merchant number of
the merchant for which this batch is being retrieved.batchNumber
- a String containing the batch number of the
batch to retrieve.ETillAbortOperation
- thrown if retrieval failed. Use the
primary and secondary return codes in the
exception object to determine the cause.public static Order retrieveOrder(String merchantNumber, String orderNumber) throws ETillAbortOperation
merchantNumber
- a String containing the merchant number of
the merchant for which this order belongs.orderNumber
- a String containing the order number of
the order to retrieve.ETillAbortOperation
- thrown if retrieval failed. Use the
primary and secondary return codes in the
exception object to determine the cause.public static void loadLibrary(String libName)
libName
- a String containing the "name" of the library
to load. Examples: assuming the string "xyz"
is passed into this method,
public static void releaseOrder(Order order)
order
- the Order object to release from the cachepublic static void removeOrder(Order order)
order
- the order object to remove.public static void pruneOrder(Order order, CommitPoint commitPoint) throws ETillAbortOperation
order
- the order to be pruned.commitPoint
- a CommitPoint for archiving.ETillAbortOperation
- if the Order can not be prunedpublic static void pruneOrder(Order order) throws ETillAbortOperation
order
- the order to be pruned.ETillAbortOperation
- if the Order can not be prunedpublic static void pruneOrders(String merchantNumber, Enumeration orders) throws ETillAbortOperation
merchantNumber
- the merchant identifierorders
- enumeration of OrderNumbers to deleteETillAbortOperation
- if the Orders can not be prunedpublic static Hashtable batchesForAccount(String merchantNumber, String paymentType, String accountNumber)
merchantNumber
- a String containing the merchant number of
the merchant that owns the batches.paymentType
- a String that identifies the payment protocol
associated with the batches. This is actually
the name of the cassette.accountNumber
- a String containing the account number of
the account through which the batches are
processed.BatchKey
is used as the key, with
the referenced element being the Batch object.BatchKey
public static Timestamp getTimestamp(long date)
date
- a long containing a date and time expresssed as
the number of milliseconds since January 1, 1970,
00:00:00 UTC.public static Cassette getCassette(String paymentSystem) throws ETillAbortOperation
paymentType
- a String that identifies the payment protocol
associated with the cassette. This is actually
the name of the cassette.ETillAbortOperation
- thrown if the cassette object cannot be located.public static CommitPoint getThreadCommitPoint()
Archivable
,
CommitPoint
,
ETillArchive
public static void addItemToServiceQueue(WorkItem item)
item
- the WorkItem object to enqueue.CassetteWorkItem
public static void addItemToTimerQueue(TimeableTransaction item)
item
- the TimeableTransaction object to enqueue.CassetteWorkItem
,
TimeableTransaction
public static void removeItemFromTimerQueue(TimeableTransaction item)
item
- the TimeableTransaction object to dequeue.CassetteWorkItem
,
TimeableTransaction
public static String getExponentForCurrency(String currency)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |