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
 void forceAttributePushEvent(java.lang.String deviceName, java.lang.String attributeName, EventType eventType)
          update attribute value and fire event without check
 fr.esrf.Tango.DevVarLongStringArray getConnectionParameters()
          returns the connection parameters for specified event.
 fr.esrf.Tango.DevVarLongStringArray getConnectionParameters(java.lang.String deviceName)
          Initialize ZMQ event system if not already done, subscribe to the interface change event end returns the connection parameters.
 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.
 fr.esrf.Tango.DevVarLongStringArray getConnectionParameters(java.lang.String deviceName, PipeImpl pipe)
          Initialize ZMQ event system if not already done, subscribe to the specified event end returns the connection parameters for specified event.
static EventManager getInstance()
           
 boolean hasSubscriber(java.lang.String deviceName)
           
 void pushAttributeConfigEvent(java.lang.String deviceName, java.lang.String attributeName)
           
 void pushAttributeDataReadyEvent(java.lang.String deviceName, java.lang.String attributeName, int counter)
          fire event with AttDataReady
 void pushAttributeEvent(java.lang.String deviceName, java.lang.String attributeName)
          Check if the event must be sent and fire it if must be done
 void pushAttributeEvent(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 pushAttributeEvent(java.lang.String deviceName, java.lang.String attributeName, EventType eventType)
          fire event
 void pushInterfaceChangedEvent(java.lang.String deviceName, fr.esrf.Tango.DevIntrChange deviceInterface)
           
 void pushPipeEvent(java.lang.String deviceName, java.lang.String pipeName, fr.esrf.Tango.DevFailed devFailed)
           
 void pushPipeEvent(java.lang.String deviceName, java.lang.String pipeName, PipeValue blob)
           
 
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()

hasSubscriber

public boolean hasSubscriber(java.lang.String deviceName)

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,
                                                                   PipeImpl pipe)
                                                            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
pipe - The specified event pipe
Returns:
the connection parameters for specified event.
Throws:
fr.esrf.Tango.DevFailed

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
eventType - The specified event type
Returns:
the connection parameters for specified event.
Throws:
fr.esrf.Tango.DevFailed

getConnectionParameters

public fr.esrf.Tango.DevVarLongStringArray getConnectionParameters(java.lang.String deviceName)
                                                            throws fr.esrf.Tango.DevFailed
Initialize ZMQ event system if not already done, subscribe to the interface change event end returns the connection parameters.

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

pushAttributeEvent

public void pushAttributeEvent(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

pushAttributeEvent

public void pushAttributeEvent(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

pushAttributeEvent

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

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

forceAttributePushEvent

public void forceAttributePushEvent(java.lang.String deviceName,
                                    java.lang.String attributeName,
                                    EventType eventType)
                             throws fr.esrf.Tango.DevFailed
update attribute value and fire event without check

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

pushAttributeDataReadyEvent

public void pushAttributeDataReadyEvent(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

pushAttributeConfigEvent

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

pushInterfaceChangedEvent

public void pushInterfaceChangedEvent(java.lang.String deviceName,
                                      fr.esrf.Tango.DevIntrChange deviceInterface)
                               throws fr.esrf.Tango.DevFailed
Throws:
fr.esrf.Tango.DevFailed

pushPipeEvent

public void pushPipeEvent(java.lang.String deviceName,
                          java.lang.String pipeName,
                          PipeValue blob)
                   throws fr.esrf.Tango.DevFailed
Throws:
fr.esrf.Tango.DevFailed

pushPipeEvent

public void pushPipeEvent(java.lang.String deviceName,
                          java.lang.String pipeName,
                          fr.esrf.Tango.DevFailed devFailed)
                   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-2015. All Rights Reserved.