Class ActiveWebSession


  • public class ActiveWebSession
    extends DeviceSession
    Information on active web sessions.
    • Constructor Summary

      Constructors 
      Constructor Description
      ActiveWebSession​(java.lang.String sessionId, java.lang.String userAgent, java.lang.String os, java.lang.String browser)
      Information on active web sessions.
      ActiveWebSession​(java.lang.String sessionId, java.lang.String userAgent, java.lang.String os, java.lang.String browser, java.lang.String ipAddress, java.lang.String country, java.util.Date created, java.util.Date updated, java.util.Date expires)
      Information on active web sessions.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getBrowser()
      Information on the browser used for this web session.
      java.lang.String getCountry()
      The country from which the last activity from this session was made.
      java.util.Date getCreated()
      The time this session was created.
      java.util.Date getExpires()
      The time this session expires.
      java.lang.String getIpAddress()
      The IP address of the last activity from this session.
      java.lang.String getOs()
      Information on the hosting operating system.
      java.lang.String getSessionId()
      The session id.
      java.util.Date getUpdated()
      The time of the last activity from this session.
      java.lang.String getUserAgent()
      Information on the hosting device.
      int hashCode()  
      static ActiveWebSession.Builder newBuilder​(java.lang.String sessionId, java.lang.String userAgent, java.lang.String os, java.lang.String browser)
      Returns a new builder for creating an instance of this class.
      java.lang.String toString()  
      java.lang.String toStringMultiline()
      Returns a String representation of this object formatted for easier readability.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • userAgent

        protected final java.lang.String userAgent
      • os

        protected final java.lang.String os
      • browser

        protected final java.lang.String browser
      • expires

        protected final java.util.Date expires
    • Constructor Detail

      • ActiveWebSession

        public ActiveWebSession​(java.lang.String sessionId,
                                java.lang.String userAgent,
                                java.lang.String os,
                                java.lang.String browser,
                                java.lang.String ipAddress,
                                java.lang.String country,
                                java.util.Date created,
                                java.util.Date updated,
                                java.util.Date expires)
        Information on active web sessions.

        Use newBuilder(java.lang.String,java.lang.String,java.lang.String,java.lang.String) to create instances of this class without specifying values for all optional fields.

        Parameters:
        sessionId - The session id. Must not be null.
        userAgent - Information on the hosting device. Must not be null.
        os - Information on the hosting operating system. Must not be null.
        browser - Information on the browser used for this web session. Must not be null.
        ipAddress - The IP address of the last activity from this session.
        country - The country from which the last activity from this session was made.
        created - The time this session was created.
        updated - The time of the last activity from this session.
        expires - The time this session expires.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • ActiveWebSession

        public ActiveWebSession​(java.lang.String sessionId,
                                java.lang.String userAgent,
                                java.lang.String os,
                                java.lang.String browser)
        Information on active web sessions.

        The default values for unset fields will be used.

        Parameters:
        sessionId - The session id. Must not be null.
        userAgent - Information on the hosting device. Must not be null.
        os - Information on the hosting operating system. Must not be null.
        browser - Information on the browser used for this web session. Must not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
    • Method Detail

      • getSessionId

        public java.lang.String getSessionId()
        The session id.
        Overrides:
        getSessionId in class DeviceSession
        Returns:
        value for this field, never null.
      • getUserAgent

        public java.lang.String getUserAgent()
        Information on the hosting device.
        Returns:
        value for this field, never null.
      • getOs

        public java.lang.String getOs()
        Information on the hosting operating system.
        Returns:
        value for this field, never null.
      • getBrowser

        public java.lang.String getBrowser()
        Information on the browser used for this web session.
        Returns:
        value for this field, never null.
      • getIpAddress

        public java.lang.String getIpAddress()
        The IP address of the last activity from this session.
        Overrides:
        getIpAddress in class DeviceSession
        Returns:
        value for this field, or null if not present.
      • getCountry

        public java.lang.String getCountry()
        The country from which the last activity from this session was made.
        Overrides:
        getCountry in class DeviceSession
        Returns:
        value for this field, or null if not present.
      • getCreated

        public java.util.Date getCreated()
        The time this session was created.
        Overrides:
        getCreated in class DeviceSession
        Returns:
        value for this field, or null if not present.
      • getUpdated

        public java.util.Date getUpdated()
        The time of the last activity from this session.
        Overrides:
        getUpdated in class DeviceSession
        Returns:
        value for this field, or null if not present.
      • getExpires

        public java.util.Date getExpires()
        The time this session expires.
        Returns:
        value for this field, or null if not present.
      • newBuilder

        public static ActiveWebSession.Builder newBuilder​(java.lang.String sessionId,
                                                          java.lang.String userAgent,
                                                          java.lang.String os,
                                                          java.lang.String browser)
        Returns a new builder for creating an instance of this class.
        Parameters:
        sessionId - The session id. Must not be null.
        userAgent - Information on the hosting device. Must not be null.
        os - Information on the hosting operating system. Must not be null.
        browser - Information on the browser used for this web session. Must not be null.
        Returns:
        builder for this class.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class DeviceSession
      • toStringMultiline

        public java.lang.String toStringMultiline()
        Returns a String representation of this object formatted for easier readability.

        The returned String may contain newlines.

        Overrides:
        toStringMultiline in class DeviceSession
        Returns:
        Formatted, multiline String representation of this object