Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

For e.g. UserVMStateListener which is listener for the state changes of user VM's would create event object and post on to the event bus as below.

    public boolean postStateTransitionEvent(State oldState, Event event, State newState, VirtualMachine vo, boolean status, Object opaque) {

            _eventBus.post(new UserVmStateChangeEventVO(....));

...

A subscriber interested in the user VM state change would register to the event and get the events as below

    _eventBus.register(this)

    @Subscribe

    public void userVMStateChangetHandler(UserVmStateChangeEventVO event)

...