code: public static IEventTrigger createEventTrigger(final EventType eventType, final AttributeImpl attribute)
              throws DevFailed {
          LOGGER.debug("create event trigger for attribute {} of type {}", attribute.getName(), eventType);
          final EventProperties props = attribute.getProperties().getEventProp();
          IEventTrigger eventTrigger;
          switch (eventType) {
              case PERIODIC_EVENT:
                  final long period = Long.parseLong(props.per_event.period);
                  eventTrigger = new PeriodicEventTrigger(period, attribute);
                  break;
              case CHANGE_EVENT:
                  eventTrigger = new ChangeEventTrigger(attribute, props.ch_event.abs_change, props.ch_event.rel_change);
                  break;
              case ARCHIVE_EVENT:
                  long periodA;
                  try {
                      // Check if specified and a number
                      periodA = Long.parseLong(props.arch_event.period);
                  } catch (final NumberFormatException e) {
                      periodA = -1;
                  }
                  eventTrigger = new ArchiveEventTrigger(periodA, props.arch_event.abs_change,
                          props.arch_event.rel_change, attribute);
                  break;
              case ATT_CONF_EVENT:
              case DATA_READY_EVENT:
              case USER_EVENT:
              case INTERFACE_CHANGE_EVENT:
              case PIPE_EVENT:
              default:
                  eventTrigger = new DefaultEventTrigger();
                  break;
  
          }
          return eventTrigger;
      }
docs: Create an {@link IEventTrigger}
  
  @param eventType The event type
  @param attribute The attribute that will send events
  @return the created EventTrigger object
  @throws DevFailed