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:
- Import “com.evelopers.unimod.sample.messengersa” sample into the Eclipse workspace (see Samples Usage Guidelines).
- Open “resources/diagrams/server.unimod”.
- 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.
- Open “resources/diagrams/client.unimod”.
- Switch to Java perspective.
- In main menu select [Run › Run...].
- In opened dialog select node “UniMod Interpreter” and press button “New”.
- In tab “UniMod Main” in left tree select file “resources/diagrams/client.unimod”, in right tree select A1.
- 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.
- In client application window push “Connect” button to connect to server, push “Send” button to send messages to other clients.
- 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.