Packageorg.granite.tide.data
Classpublic class DataObserver
InheritanceDataObserver Inheritance flash.events.EventDispatcher
ImplementsIComponent

The DataObserver component can be bound to a JMS topic and receive updates to managed entities.
This component encapsulates a Gravity Consumer.
All updates received are merged in the global context and a Flex event is dispatched to indicate what happened.

The events raised by this component are :
org.granite.tide.data.persist.<entityName>
org.granite.tide.data.update.<entityName>
org.granite.tide.data.remove.<entityName>

Where <entityName> is the unqualified class name of the entity.



Public Properties
 PropertyDefined by
  meta_name : String
[read-only]
DataObserver
  topic : String
[write-only]
DataObserver
Public Methods
 MethodDefined by
  
meta_clear():void
DataObserver
  
meta_init(componentName:String, context:BaseContext):void
DataObserver
  
subscribe():void
Subscribe the data topic
DataObserver
  
subscribeHandler(event:Event):void
DataObserver
  
unsubscribe():void
Unsubscribe the data topic
DataObserver
Protected Methods
 MethodDefined by
  
messageHandler(event:MessageEvent):void
Message handler that merges data from the JMS topic in the current context.
Could be overriden to provide custom behaviour.
DataObserver
Property detail
meta_nameproperty
meta_name:String  [read-only]

This property can be used as the source for data binding.

Implementation
    public function get meta_name():String
topicproperty 
topic:String  [write-only]

This property can be used as the source for data binding.

Implementation
    public function set topic(value:String):void
Method detail
messageHandler()method
protected function messageHandler(event:MessageEvent):void

Message handler that merges data from the JMS topic in the current context.
Could be overriden to provide custom behaviour.

Parameters
event:MessageEvent — message event from the Consumer
meta_clear()method 
public function meta_clear():void
meta_init()method 
public function meta_init(componentName:String, context:BaseContext):voidParameters
componentName:String
 
context:BaseContext
subscribe()method 
public function subscribe():void

Subscribe the data topic

subscribeHandler()method 
public function subscribeHandler(event:Event):voidParameters
event:Event
unsubscribe()method 
public function unsubscribe():void

Unsubscribe the data topic