BeeSoft®
Since 1992
 

Content

 Welcome
 Products
       Abeona
       Gaia
             News
             Documentation
                   Introduction
                   Swing support
                         Components
                         Building from XML
                         Client / server
                   Server application
                   Validation
                   XML
                   Logging
                   Utilities
                   Launcher
             License
             Download
       Hephaistos
       JavaGantt
 Services
       Promote your software
 Contact Us
 Links
      
  GaiaI®
© 2012 BeeSoft ®
 

Client / server programming

Gaia supports client / server programming with Swing clients.

There are two parts of code on the client and server side to communicate between itself.

Client must be derived from class eu.beesoft.gaia.swing.client.SwingClient. This is an abstract implementation of the swing client for Gaia application (there is the ApplicationServer on the server side). This class has as high level of abstraction as possible: it processes the communication with a server, but has no limits on processing of the incoming instructions.

With this class you get an instrument to build your own client, with your own instruction set and your own Swing presentation.

In the simplest implementation of your subclass you have to:

  • create a Swing application (instance of JFrame or JDialog) - the best place to do it is probably a constructor
  • override getCurrentBuilder() method
  • override getCurrentWindow() method
  • override processApplicationResponse(ApplicationResponse, SwingClientAction) method - here you will process (your own) instructions returned from the server. Please, note, there is the method buildForm(ApplicationResponse, SwingBuilderFactory) prepared to help with this work.

Swing actions should be converted to the SwingClientAction, which forwards actionPerformed() method to the SwingClient.

On the server side there is the class eu.beesoft.gaia.swing.server.ApplicationServer prepared to communicate with a client. It creates the Application and Controller instances and forwards the flow control to them. You can read about programming on the server in the next chapters.