Messenger Standalone

Description

Messenger Standalone sample shows how to design and develop client-server standalone applications using UniMod. Application consists of client and server parts.

Run sample from Eclipse

To assemble and run application from within Eclipse do the following:

  1. Import “com.evelopers.unimod.sample.messengersa” sample into the Eclipse workspace (see Samples Usage Guidelines).
  2. Open “resources/diagrams/server.unimod”.
  3. Open context menu for state machine A2 on Connectivity Diagram and select “Launch A2!” — it will start server application, you may see log output in console view.
  4. Open “resources/diagrams/client.unimod”.
  5. Switch to Java perspective.
  6. In main menu select [Run › Run...].
  7. In opened dialog select node “UniMod Interpreter” and press button “New”.
  8. In tab “UniMod Main” in left tree select file “resources/diagrams/client.unimod”, in right tree select A1.
  9. In tab “Arguments” in text field “Program Arguments” write “config1.properties” and press “Run” button at the bottom right of the dialog window — it will start client application, you may see log output in console window.
  10. In client application window push “Connect” button to connect to server, push “Send” button to send messages to other clients.
  11. You may start more then one client application using steps from 6 till 9, during step 9 you may define also “config2.properties” and “config3.properties”.

If you want to make changes in application behavior: stop application, edit diagrams and restart application.