Class DynamicConverter<E>

All Implemented Interfaces:
ContextAware, LifeCycle
Direct Known Subclasses:
CompositeConverter, DateTokenConverter, IntegerTokenConverter

public abstract class DynamicConverter<E> extends FormattingConverter<E> implements LifeCycle, ContextAware
  • Field Details

    • started

      protected boolean started
      Is this component active?
  • Constructor Details

    • DynamicConverter

      public DynamicConverter()
  • Method Details

    • start

      public void start()
      Components that depend on options passed during configuration can override this method in order to make appropriate use of those options. For simpler components, the trivial implementation found in this abstract class will be sufficient.
      Specified by:
      start in interface LifeCycle
    • stop

      public void stop()
      Specified by:
      stop in interface LifeCycle
    • isStarted

      public boolean isStarted()
      Specified by:
      isStarted in interface LifeCycle
    • setOptionList

      public void setOptionList(List<String> optionList)
    • getFirstOption

      public String getFirstOption()
      Return the first option passed to this component. The returned value may be null if there are no options.
      Returns:
      First option, may be null.
    • getOptionList

      protected List<String> getOptionList()
    • setContext

      public void setContext(Context context)
      Specified by:
      setContext in interface ContextAware
    • getContext

      public Context getContext()
      Specified by:
      getContext in interface ContextAware
    • addStatus

      public void addStatus(Status status)
      Specified by:
      addStatus in interface ContextAware
    • addInfo

      public void addInfo(String msg)
      Specified by:
      addInfo in interface ContextAware
    • addInfo

      public void addInfo(String msg, Throwable ex)
      Specified by:
      addInfo in interface ContextAware
    • addWarn

      public void addWarn(String msg)
      Specified by:
      addWarn in interface ContextAware
    • addWarn

      public void addWarn(String msg, Throwable ex)
      Specified by:
      addWarn in interface ContextAware
    • addError

      public void addError(String msg)
      Specified by:
      addError in interface ContextAware
    • addError

      public void addError(String msg, Throwable ex)
      Specified by:
      addError in interface ContextAware