Class ConnectorSession

  • All Implemented Interfaces:
    java.io.Serializable

    public class ConnectorSession
    extends java.lang.Object
    implements java.io.Serializable
    Container for Connector "session state". Session state consists of headers, cookies and parameters that need to be bound onto the connector with subsequent connections. This class essentially allows for the mimic of Browser-like functionality in terms of subsequent Connectors reusing state from previous Connector responses.
    Author:
    muzquiano
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ConnectorSession​(java.lang.String endpointId)
      Instantiates a new connector session.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCookie​(java.lang.String name)
      Gets a header.
      java.lang.String[] getCookieNames()
      Returns the cookie names.
      java.lang.String getEndpointId()
      Gets the endpoint id.
      java.lang.String getParameter​(java.lang.String key)
      Gets a parameter.
      java.lang.String[] getParameterKeys()
      Returns the parameter keys.
      void setCookie​(java.lang.String name, java.lang.String value)
      Sets a given header.
      void setParameter​(java.lang.String key, java.lang.String value)
      Sets a given parameter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConnectorSession

        public ConnectorSession​(java.lang.String endpointId)
        Instantiates a new connector session.
        Parameters:
        endpointId - the endpoint id
    • Method Detail

      • getEndpointId

        public java.lang.String getEndpointId()
        Gets the endpoint id.
        Returns:
        the endpoint id
      • getParameter

        public java.lang.String getParameter​(java.lang.String key)
        Gets a parameter.
        Parameters:
        key - the key
        Returns:
        the parameter
      • setParameter

        public void setParameter​(java.lang.String key,
                                 java.lang.String value)
        Sets a given parameter.
        Parameters:
        key - the key
        value - the value
      • getParameterKeys

        public java.lang.String[] getParameterKeys()
        Returns the parameter keys.
        Returns:
        array of parameter keys
      • getCookie

        public java.lang.String getCookie​(java.lang.String name)
        Gets a header.
        Parameters:
        name - the name
        Returns:
        the header
      • setCookie

        public void setCookie​(java.lang.String name,
                              java.lang.String value)
        Sets a given header.
        Parameters:
        name - the name
        value - the header
      • getCookieNames

        public java.lang.String[] getCookieNames()
        Returns the cookie names.
        Returns:
        array of cookie names