Package com.ibm.retail.AEF.server

Provides access to real and virtual sessions through AEFBase and the SessionServer interface.

See:
          Description

Interface Summary
LoadBalancer LoadBalancer provides an API to enable load balancing logic to be used by the AEF SessionServer.
SessionServer SessionServer provides the client interface for requesting AEFSession objects.
 

Class Summary
AEFBase AEFBase is the main object used to create an AEF enabled real terminal or virtual terminal environment.
StandAloneSessionServer StandAloneSessionServer includes a main that will produce a SessionServer.
 

Package com.ibm.retail.AEF.server Description

Provides access to real and virtual sessions through AEFBase and the SessionServer interface.

The server package includes the classes and interfaces needed for an application to obtain an instance of an AEFSession object. An AEFSession object encapsulates the data and function of an active real or virtual POS terminal.

AEFBase is used to initialize an AEF environment. It reads the settings contained in the config.properties chain of files to determine the environment and to instantiate the necessary objects required to support the environment. Refer to Configuring the AEF for more information.

SessionServer provides a simple interface for obtaining an AEFSession object from the AEF. It provides two methods for obtaining a session:

Sample Usage:

   try
   {
      SessionServer server = AEFBase.getInstance().getSessionServer();
      if (server != null)
      {
         // connected to server, now get any available AEF terminal session
         AEFSession session = server.getAvailableSession();
         if (session != null)
         {
            // got a session... perform actions or listen to events 


         }
         else
         {
            // couldn't get a session -- all sessions in use
            System.err.println("Unable to obtain AEFSession.  "); 
         }
      }
      else
      {
         // couldn't connect -- URL is incorrect or server is down
         System.err.println("Unable to connect to AEF SessionServer.  "); 
      }
   }
   catch (AEFException ae)
   {
      System.err.println("An AEF exception occurred: " + ae.getMessage()); 
   }
   catch (RemoteException re)
   {
      System.err.println("A remote exception occurred: " + re.getMessage()); 
   }



Copyright © 2004 IBM. All Rights Reserved.
Generated: July 19 2004