com.ibm.retail.saf.provider
Interface POSProvider

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
KioskPOSProvider, PriceChecker, PriceProvider, SalesProvider
All Known Implementing Classes:
KioskPOSProviderImpl

public interface POSProvider
extends java.rmi.Remote

Provides the common superinterface to define specific modes of accessing the point-of-sale system.

POSProvider instances allow client access to the point-of-sale system through high-level functions that accept POSRequest objects as input and return POSResult objects as output.

POSProvider defines the service methods to determine the status of the point-of-sale system and record exceptions in the POS exception log.

An instance of POSProvider is obtained through an implementation of the POSProviderFactory interface. A ProviderRequest object defines the parameters used by the factory to instantiate a POSProvider and connect to the point-of-sale system. These parameters include the terminal number or a range of terminal numbers used by the client to access the point-of-sale system.

After an instance of POSProvider is obtained, it may be used to submit requests to the point-of-sale system. An instance of POSProvider may be used repeatedly by the client application to submit requests to the point-of-sale system. After the client has completed its processing, it should call the release method before shutting down. The release method releases the point-of-sale resources and makes them available for subsequent access through the POSProviderFactory.


Method Summary
 com.ibm.retail.saf.provider.POSStatus getPOSStatus()
          Get status of the virtual POS session This method provides a means for the client to interrogate the status of the virtual POS session state and whether point-of-sale exception log.
 boolean isPOSActive()
          Checks the point-of-sale system associated with this provider to determine if it is in a state which allows requests to be sent from a client.
 void release()
          Releases the point-of-sale resources associated with this POSProvider.
 

Method Detail

isPOSActive

public boolean isPOSActive()
                    throws POSException,
                           RecoveryException,
                           java.rmi.RemoteException
Checks the point-of-sale system associated with this provider to determine if it is in a state which allows requests to be sent from a client.

This function performs a general "health check" of the communication between the provider and the point-of-sale system. It checks that the function on the point-of-sale system used by the provider is currently available.

If the POS is not able to receive and process requests, an exception is thrown which details the error condition.

Throws:
POSException - if the POS is not active.
RecoveryException - if the POSProvider is in an error recovery state and is unable to process this request.
java.rmi.RemoteException

release

public void release()
             throws POSException,
                    java.rmi.RemoteException
Releases the point-of-sale resources associated with this POSProvider.

If the provider has a transaction still in progress it will cancel the transaction prior to the release.

Throws:
POSException - if the point-of-sale system is unable to process the request. The exception wrappers the cause and provides further details on the current condition.
java.rmi.RemoteException

getPOSStatus

public com.ibm.retail.saf.provider.POSStatus getPOSStatus()
                                                   throws POSException,
                                                          java.rmi.RemoteException
Get status of the virtual POS session

This method provides a means for the client to interrogate the status of the virtual POS session state and whether point-of-sale exception log. This is useful in cases where the processing of a transaction failed to complete normally and may require store attention to reconcile.

Throws:
POSException - if the point-of-sale system is unable to process the request. The exception wrappers the cause and provides further details on the current condition.
java.rmi.RemoteException