com.bankframe.ei.txnhandler.storeandforward.forwardtransaction
Class ForwardTransactionBean

java.lang.Object
  extended bycom.bankframe.ei.txnhandler.storeandforward.forwardtransaction.ForwardTransactionBean
All Implemented Interfaces:
ForwardTransaction
Direct Known Subclasses:
ForwardTransactionBean

public abstract class ForwardTransactionBean
extends java.lang.Object
implements ForwardTransaction

This class defines the basis of the ForwardTransaction session EJB implementation. It provides a method that allow requests to be forwarded from the store. This class will send data to a servlet that will release requests from the store at a specified rate.


Constructor Summary
ForwardTransactionBean()
           
 
Method Summary
 DataPacket forwardAll(java.lang.String threadName)
          This method will forward all requests in the queue.
 DataPacket forwardAll(java.lang.String threadName, int delay)
          This method will forward all requests in the queue.
 DataPacket forwardSingle(java.lang.String threadName, int sequenceNumber)
          This method will forward an individual request from the queue
 DataPacket forwardSubset(java.lang.String threadName, java.util.SortedSet transactions, int delay)
          This method will forward a subset of the store.
 DataPacket setMonitorStatus(int delay)
          This method will set the status of the host monitor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForwardTransactionBean

public ForwardTransactionBean()
Method Detail

forwardAll

public DataPacket forwardAll(java.lang.String threadName)
                      throws java.rmi.RemoteException,
                             ProcessingErrorException
This method will forward all requests in the queue. It will terminate when the queue is empty or if the queue goes offline

Specified by:
forwardAll in interface ForwardTransaction
Parameters:
threadName - the name to be given to the forwarding thread
Returns:
a DataPacket containing the result of the operation
Throws:
java.rmi.RemoteException
ProcessingErrorException

forwardAll

public DataPacket forwardAll(java.lang.String threadName,
                             int delay)
                      throws java.rmi.RemoteException,
                             ProcessingErrorException
This method will forward all requests in the queue. It will terminate when the queue is empty or if the queue goes offline

Specified by:
forwardAll in interface ForwardTransaction
Parameters:
threadName - the name to be given to the forwarding thread
delay - the time to wait between forwarding transactions in milliseconds
Returns:
a DataPacket containing the result of the operation
Throws:
java.rmi.RemoteException
ProcessingErrorException

forwardSingle

public DataPacket forwardSingle(java.lang.String threadName,
                                int sequenceNumber)
                         throws java.rmi.RemoteException
This method will forward an individual request from the queue

Specified by:
forwardSingle in interface ForwardTransaction
Parameters:
threadName - the name to be given to the forwarding thread
sequenceNumber - the sequence number of the request to process
Returns:
a DataPacket containing the result of the operation
Throws:
java.rmi.RemoteException

forwardSubset

public DataPacket forwardSubset(java.lang.String threadName,
                                java.util.SortedSet transactions,
                                int delay)
                         throws java.rmi.RemoteException
This method will forward a subset of the store.

Specified by:
forwardSubset in interface ForwardTransaction
Parameters:
threadName - the name to be given to the forwarding thread
delay - The number of requests to forward per second, -1 for no delay
Returns:
a DataPacket containing the result of this operation
Throws:
java.rmi.RemoteException

setMonitorStatus

public DataPacket setMonitorStatus(int delay)
This method will set the status of the host monitor. This method assigns the rate parameter as the number of milliseconds to delay between each try to forward a request to the store. If this is set to -1 then the monitor is suspended

Specified by:
setMonitorStatus in interface ForwardTransaction
Parameters:
delay - the number of milliseconds to delay for
Returns:
a DataPacket containing the result of this operation
Throws:
java.rmi.RemoteException


Copyright © 2005, 2007, Oracle. All rights reserved.