Class AbstractWebserviceResponseDataPostProcessor<T>

  • Type Parameters:
    T - the type of response data to post-process
    All Implemented Interfaces:
    adams.core.Destroyable, adams.core.ErrorProvider, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, adams.flow.core.FlowContextHandler, Serializable
    Direct Known Subclasses:
    NullPostProcessor

    public abstract class AbstractWebserviceResponseDataPostProcessor<T>
    extends adams.core.option.AbstractOptionHandler
    implements adams.flow.core.FlowContextHandler, adams.core.ErrorProvider
    Ancestor for schemes that post-process the response data received from the server end of the webservice. E.g., for handling potential error messages in the response rather than just quietly ignoring them.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected adams.flow.core.Actor m_FlowContext
      the flow context.
      protected String m_LastError
      the last error that was generated.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract void doPostProcess​(T response)
      For post-processing the response data.
      adams.flow.core.Actor getFlowContext()
      Returns the flow context, if any.
      String getLastError()
      Returns the last error that occurred.
      boolean hasLastError()
      Checks whether there was an error with the last call.
      void postProcess​(T response)
      For post-processing the response data.
      void setFlowContext​(adams.flow.core.Actor value)
      Sets the flow context.
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Field Detail

      • m_FlowContext

        protected adams.flow.core.Actor m_FlowContext
        the flow context.
      • m_LastError

        protected String m_LastError
        the last error that was generated.
    • Constructor Detail

      • AbstractWebserviceResponseDataPostProcessor

        public AbstractWebserviceResponseDataPostProcessor()
    • Method Detail

      • setFlowContext

        public void setFlowContext​(adams.flow.core.Actor value)
        Sets the flow context.
        Specified by:
        setFlowContext in interface adams.flow.core.FlowContextHandler
        Parameters:
        value - the actor
      • getFlowContext

        public adams.flow.core.Actor getFlowContext()
        Returns the flow context, if any.
        Specified by:
        getFlowContext in interface adams.flow.core.FlowContextHandler
        Returns:
        the actor, null if none available
      • hasLastError

        public boolean hasLastError()
        Checks whether there was an error with the last call.
        Specified by:
        hasLastError in interface adams.core.ErrorProvider
        Returns:
        true if there was an error
        See Also:
        getLastError()
      • getLastError

        public String getLastError()
        Returns the last error that occurred.
        Specified by:
        getLastError in interface adams.core.ErrorProvider
        Returns:
        the last error, null if none occurred
      • doPostProcess

        protected abstract void doPostProcess​(T response)
        For post-processing the response data.
        Parameters:
        response - the data to post-process
      • postProcess

        public void postProcess​(T response)
        For post-processing the response data.
        Parameters:
        response - the data to post-process