Class AbstractClientAuthentication

  • All Implemented Interfaces:
    adams.core.Destroyable, 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:
    BasicAuthentication, NoAuthentication

    public abstract class AbstractClientAuthentication
    extends adams.core.option.AbstractOptionHandler
    implements adams.flow.core.FlowContextHandler
    Ancestor for client authentication schemes.
    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.
      • 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 String check()
      Hook method for checks.
      protected abstract adams.core.base.BaseKeyValuePair[] doGenerate​(adams.core.MessageCollection errors)
      Generates the authentication parameters for sending to the server.
      adams.core.base.BaseKeyValuePair[] generate​(adams.core.MessageCollection errors)
      Generates the authentication parameters for sending to the server.
      adams.flow.core.Actor getFlowContext()
      Returns the flow context, if any.
      protected abstract boolean requiresFlowContext()
      Whether the scheme actually requires a flow context.
      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 transient adams.flow.core.Actor m_FlowContext
        the flow context.
    • Constructor Detail

      • AbstractClientAuthentication

        public AbstractClientAuthentication()
    • 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
      • requiresFlowContext

        protected abstract boolean requiresFlowContext()
        Whether the scheme actually requires a flow context.
        Returns:
        true if required
      • check

        protected String check()
        Hook method for checks.
        Returns:
        null if check passed, otherwise error message
      • doGenerate

        protected abstract adams.core.base.BaseKeyValuePair[] doGenerate​(adams.core.MessageCollection errors)
        Generates the authentication parameters for sending to the server.
        Parameters:
        errors - for collecting errors
        Returns:
        the generated key-value pairs, null in case of an error
      • generate

        public adams.core.base.BaseKeyValuePair[] generate​(adams.core.MessageCollection errors)
        Generates the authentication parameters for sending to the server.
        Parameters:
        errors - for collecting errors
        Returns:
        the generated key-value pairs, null in case of an error