Packageorg.granite.tide.events
Classpublic class EventRouter
InheritanceEventRouter Inheritance flash.events.EventDispatcher
ImplementsIComponent, IEventInterceptor

The EventRouter component can be bound to a JMS topic and send and receive events to the server.
This component encapsulates a Gravity Consumer and a Producer.



Public Properties
 PropertyDefined by
  meta_name : String
[read-only]
EventRouter
Public Methods
 MethodDefined by
  
afterDispatch(contextEvent:TideContextEvent):void
Event interceptor that sends serialization-enabled events to the JMS topic
Could be overriden to provide custom behaviour.
EventRouter
  
beforeDispatch(contextEvent:TideContextEvent):void
EventRouter
  
meta_clear():void
EventRouter
  
meta_init(componentName:String, context:BaseContext):void
EventRouter
  
subscribe():void
Subscribe the topic
EventRouter
  
subscribeHandler(event:Event):void
EventRouter
  
unsubscribe():void
Unsubscribe the topic
EventRouter
Protected Methods
 MethodDefined by
  
messageHandler(messageEvent:MessageEvent):void
Message handler that dispatches the event received from the JMS topic
Could be overriden to provide custom behaviour.
EventRouter
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
Method detail
afterDispatch()method
public function afterDispatch(contextEvent:TideContextEvent):void

Event interceptor that sends serialization-enabled events to the JMS topic
Could be overriden to provide custom behaviour.

Parameters
contextEvent:TideContextEvent — client-side event
beforeDispatch()method 
public function beforeDispatch(contextEvent:TideContextEvent):voidParameters
contextEvent:TideContextEvent
messageHandler()method 
protected function messageHandler(messageEvent:MessageEvent):void

Message handler that dispatches the event received from the JMS topic
Could be overriden to provide custom behaviour.

Parameters
messageEvent: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 topic

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

Unsubscribe the topic