org.tango.server.events
Class EventManager

java.lang.Object
  extended by org.tango.server.events.EventManager

public final class EventManager
extends java.lang.Object

Set of ZMQ low level utilities

Author:
verdier

Method Summary
static void checkEventCriteria(AttributeImpl attribute, EventType eventType)
          Check if event criteria are set for change and archive events
 void close()
          Close all zmq resources
 fr.esrf.Tango.DevVarLongStringArray getConnectionParameters()
          returns the connection parameters for specified event.
 fr.esrf.Tango.DevVarLongStringArray getConnectionParameters(java.lang.String deviceName, AttributeImpl attribute, EventType eventType)
          Initialize ZMQ event system if not already done, subscribe to the specified event end returns the connection parameters for specified event.
static EventManager getInstance()
           
 void pushConfigEvent(java.lang.String deviceName, java.lang.String attributeName)
           
 void pushDataReadyEvent(java.lang.String deviceName, java.lang.String attributeName, int counter)
          fire event with AttDataReady
 void pushEvent(java.lang.String deviceName, java.lang.String attributeName)
          Check if the event must be sent and fire it if must be done
 void pushEvent(java.lang.String deviceName, java.lang.String attributeName, fr.esrf.Tango.DevFailed devFailed)
          Check if the event must be sent and fire it if must be done
 void pushEvent(java.lang.String deviceName, java.lang.String attributeName, EventType eventTypeName)
          fire event
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static EventManager getInstance()

close

public void close()
Close all zmq resources


getConnectionParameters

public fr.esrf.Tango.DevVarLongStringArray getConnectionParameters()
returns the connection parameters for specified event.


getConnectionParameters

public fr.esrf.Tango.DevVarLongStringArray getConnectionParameters(java.lang.String deviceName,
                                                                   AttributeImpl attribute,
                                                                   EventType eventType)
                                                            throws fr.esrf.Tango.DevFailed
Initialize ZMQ event system if not already done, subscribe to the specified event end returns the connection parameters for specified event.

Parameters:
deviceName - The specified event device name
attribute - The specified event attribute name
eventType - The specified event type
Returns:
the connection parameters for specified event.
Throws:
fr.esrf.Tango.DevFailed

pushEvent

public void pushEvent(java.lang.String deviceName,
                      java.lang.String attributeName,
                      fr.esrf.Tango.DevFailed devFailed)
               throws fr.esrf.Tango.DevFailed
Check if the event must be sent and fire it if must be done

Parameters:
attributeName - specified event attribute
devFailed - the attribute failed error to be sent as event
Throws:
fr.esrf.Tango.DevFailed

pushEvent

public void pushEvent(java.lang.String deviceName,
                      java.lang.String attributeName)
               throws fr.esrf.Tango.DevFailed
Check if the event must be sent and fire it if must be done

Parameters:
attributeName - specified event attribute
Throws:
fr.esrf.Tango.DevFailed

pushEvent

public void pushEvent(java.lang.String deviceName,
                      java.lang.String attributeName,
                      EventType eventTypeName)
               throws fr.esrf.Tango.DevFailed
fire event

Parameters:
deviceName - Specified event device
attributeName - specified event attribute name
eventTypeName - specified event type.
Throws:
fr.esrf.Tango.DevFailed

pushDataReadyEvent

public void pushDataReadyEvent(java.lang.String deviceName,
                               java.lang.String attributeName,
                               int counter)
                        throws fr.esrf.Tango.DevFailed
fire event with AttDataReady

Parameters:
deviceName - Specified event device
attributeName - specified event attribute name
counter - a counter value
Throws:
fr.esrf.Tango.DevFailed

pushConfigEvent

public void pushConfigEvent(java.lang.String deviceName,
                            java.lang.String attributeName)
                     throws fr.esrf.Tango.DevFailed
Throws:
fr.esrf.Tango.DevFailed

checkEventCriteria

public static void checkEventCriteria(AttributeImpl attribute,
                                      EventType eventType)
                               throws fr.esrf.Tango.DevFailed
Check if event criteria are set for change and archive events

Parameters:
attribute - the specified attribute
eventType - the specified event type
Throws:
fr.esrf.Tango.DevFailed - if event type is change or archive and no event criteria is set.


Copyright © 2012-2014. All Rights Reserved.