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

Field Summary
static java.lang.String IDL_LATEST
           
static java.lang.String IDL_REGEX
           
static int MINIMUM_IDL_VERSION
           
 
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)
          fire event without check
 fr.esrf.Tango.DevVarLongStringArray getInfo()
          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)
           
 fr.esrf.Tango.DevVarLongStringArray subcribe(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 subcribe(java.lang.String deviceName, AttributeImpl attribute, EventType eventType, int idlVersion)
          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 subcribe(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MINIMUM_IDL_VERSION

public static final int MINIMUM_IDL_VERSION
See Also:
Constant Field Values

IDL_REGEX

public static final java.lang.String IDL_REGEX
See Also:
Constant Field Values

IDL_LATEST

public static final java.lang.String IDL_LATEST
See Also:
Constant Field Values
Method Detail

getInstance

public static EventManager getInstance()

hasSubscriber

public boolean hasSubscriber(java.lang.String deviceName)

close

public void close()
Close all zmq resources


getInfo

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


subcribe

public fr.esrf.Tango.DevVarLongStringArray subcribe(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

subcribe

public fr.esrf.Tango.DevVarLongStringArray subcribe(java.lang.String deviceName,
                                                    AttributeImpl attribute,
                                                    EventType eventType,
                                                    int idlVersion)
                                             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

subcribe

public fr.esrf.Tango.DevVarLongStringArray subcribe(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
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-2016. All Rights Reserved.