com.bankframe.ei.txnhandler.storeandforward.impl
Class InternalStoreAndForwardUtils

java.lang.Object
  extended bycom.bankframe.ei.txnhandler.storeandforward.impl.InternalStoreAndForwardUtils

public class InternalStoreAndForwardUtils
extends java.lang.Object

This class provides utility methods for using the store and forward features of the Transaction Handler.


Constructor Summary
InternalStoreAndForwardUtils()
           
 
Method Summary
static void addToStore(DataPacket txnData)
          This method adds a host request to the Store Queue.
static java.lang.String convertSortedSetToString(java.util.SortedSet s)
          This method is a conveinience method to convert a sorted set to a string that can be passed over HTTP using that channel management API.
static java.util.SortedSet convertStringToSortedSet(java.lang.String s)
          This method is a conveinience method to convert a string back to a sorted set.
static int getNextSequenceNo(java.lang.String sequencePk)
          This method looks up the SequenceGenerator entity to get the next sequence number to be used by the entity specified by the sequencePk.
static java.lang.String hostDestinationStatus()
          This method checks the host destinations to return their overall status.
static boolean hostOnline()
          This method checks the host status first it checks to ensure the host hasn't been set offline, if not it then checks the host destinations.
static void resetSequenceNo(java.lang.String sequencePk)
          This method is used to set the sequence number in the SequenceGenerator back to zero once the related database has been cleared.
static void setAllDestinations(java.lang.String status)
          This method is used to ensure all host destinations are set online once the host is back online and the store has been cleared.
static void updateDestination(java.lang.String txnCode, java.lang.String txnType, java.lang.String status)
          This method will ammend the online/offline status of the destination associated with this operation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalStoreAndForwardUtils

public InternalStoreAndForwardUtils()
Method Detail

addToStore

public static void addToStore(DataPacket txnData)
                       throws ProcessingErrorException,
                              java.rmi.RemoteException,
                              javax.ejb.CreateException
This method adds a host request to the Store Queue.

Parameters:
txnData - the host request transaction data.
Throws:
ProcessingErrorException
java.rmi.RemoteException
javax.ejb.CreateException

convertSortedSetToString

public static java.lang.String convertSortedSetToString(java.util.SortedSet s)
This method is a conveinience method to convert a sorted set to a string that can be passed over HTTP using that channel management API. This is only to be used by store and foward because it assumes that the objects in the set are all of type Integer

Parameters:
s - the sorted set
Returns:
a string representation of the sorted set

convertStringToSortedSet

public static java.util.SortedSet convertStringToSortedSet(java.lang.String s)
This method is a conveinience method to convert a string back to a sorted set. This is only to be used by store and foward because it assumes that the objects in the set are all of type Integer

Parameters:
s - a string representation of the sorted set
Returns:
the sorted set

getNextSequenceNo

public static int getNextSequenceNo(java.lang.String sequencePk)
                             throws ProcessingErrorException,
                                    java.rmi.RemoteException
This method looks up the SequenceGenerator entity to get the next sequence number to be used by the entity specified by the sequencePk.

Parameters:
sequencePk - the primary key to be used looking up the SequenceGenerator entity
Throws:
ProcessingErrorException
java.rmi.RemoteException

hostDestinationStatus

public static java.lang.String hostDestinationStatus()
                                              throws ProcessingErrorException
This method checks the host destinations to return their overall status.

Returns:
the destination status which is either ON_LINE, OFF_LINE or READ_ONLY.
Throws:
ProcessingErrorException

hostOnline

public static boolean hostOnline()
                          throws ProcessingErrorException
This method checks the host status first it checks to ensure the host hasn't been set offline, if not it then checks the host destinations.

Returns:
the destination status which is either ON_LINE, OFF_LINE or READ_ONLY.
Throws:
ProcessingErrorException

resetSequenceNo

public static void resetSequenceNo(java.lang.String sequencePk)
                            throws ProcessingErrorException,
                                   java.rmi.RemoteException
This method is used to set the sequence number in the SequenceGenerator back to zero once the related database has been cleared.

Parameters:
sequencePk - the primary key to be used looking up the SequenceGenerator entity
Throws:
ProcessingErrorException
java.rmi.RemoteException

setAllDestinations

public static void setAllDestinations(java.lang.String status)
                               throws ProcessingErrorException
This method is used to ensure all host destinations are set online once the host is back online and the store has been cleared.

Throws:
ProcessingErrorException

updateDestination

public static void updateDestination(java.lang.String txnCode,
                                     java.lang.String txnType,
                                     java.lang.String status)
                              throws ProcessingErrorException,
                                     java.rmi.RemoteException
This method will ammend the online/offline status of the destination associated with this operation. This does not cater for the multiple host from a single transaction fuctionallity and the host sequence number is set to 0

Parameters:
txnCode - the transaction code
txnType - the type of transaction to be carried out
status - the new status
Throws:
ProcessingErrorException
java.rmi.RemoteException


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