Training Workshop - Entities Exercise

Exercise 2: Entities

By the end of this exercise you will:

Files involved:

Run targets:


  1. Run the local elvin daemon
  2. Open a cygwin shell
  3. Run the Elvin consumer tool ec and listen for Livespace events with the command:
    ec -e elvin://localhost "require(Livespace-Protocol)"
  4. Open Eclipse from the desktop shortcut
  5. Look at and note the boilerplate code
    • constructors
    • ENTITY_TYPE constant
    • getType() method
  6. Look at
    • main() method
      • Finding the Elvin connection
      • Finding or creating the local RoomEntity
      • Creating a server
      • Cleaning up resources
    • constructor
      • Creating the Hobbit Entity
      • Creating the EntityRegistry and adding listeners
      • Creating the EntityServer
    • dispose() method
    • Running the server using a different Hobbit name.
  7. Run the Livespace Browser Application pointed at the localhost
    • Play with Hobbit properties
  8. Look at a basic client
      • Finding the Elvin connection
      • Finding the local Room
      • Clean up
      • Find our Hobbit
      • Make changes to our Hobbit
      • Note use of synchronisation
  9. Run the HobbitServer but pointing it to ics-linux as the host.
    • Change the name of your hobbit (first command line argument)
    • Use the -Dlivespace.elvin=elvin://ics-linux command line switch to use ics-linux
  10. Use the Service Browser from your Livespace Dashboard to manipulate all the Hobbits.
  11. Questions

category: Documentation, Public