de.esprit.netsuite.netdata

## Class SessionId

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.netsuite.netdata.SessionId

- All Implemented Interfaces:
    Renderable, DeepCloneable, Dumpable, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
  Direct Known Subclasses:
    CoSessionId, ServerSessionId

      public class SessionId
      extends TransferableObject
      implements Renderable, java.lang.Comparable

  This class serves as an identifier for a client session. It encapsulates a unique session ID as well as the IP-address of the client who is connected. If the client has a user authentification (login) then the UserId is set as well.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `SessionId(ServerConnection srvConn, java.lang.String serverName, java.lang.String applicationName)` Constructor for creating a client session
    `protected` | `SessionId(ServerHost serverHost, java.lang.String applicationName)` Constructor for creating a pseudo session for a not connected Co-Client
    `protected` | `SessionId(java.lang.String serverName)` Constructor for creating a pseudo session which represents the server itself

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SessionId` | `clone()`
    `int` | `compareTo(java.lang.Object o)`
    `SessionId` | `deepClone()` Returns a deep clone of this object
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `getApplicationName()` Returns the name of the client.
    `java.lang.String` | `getHostAddress()`
    `java.lang.String` | `getHostName()`
    `java.awt.Color` | `getRenderColor()`
    `javax.swing.Icon` | `getRenderIcon()`
    `java.lang.String` | `getRenderText()`
    `java.lang.String` | `getServerName()` Returns the name of the server this client is connected to
    `java.lang.String` | `getSessionInfo()`
    `int` | `getSID()`
    `int` | `getUID()`
    `java.lang.String` | `getUrlId()`
    `UserId` | `getUserId()`
    `java.lang.String` | `getUserInfo()`
    `java.lang.String` | `getUserName()`
    `java.lang.String` | `getWebId()`
    `int` | `hashCode()`
    `boolean` | `isAdmin()`
    `boolean` | `isLoggedIn()`
    `void` | `setUserId(UserId userId)`
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SessionId

          protected SessionId(java.lang.String serverName)

      Constructor for creating a pseudo session which represents the server itself

    - #### SessionId

          protected SessionId(ServerHost serverHost,
                   java.lang.String applicationName)

      Constructor for creating a pseudo session for a not connected Co-Client

    - #### SessionId

          public SessionId(ServerConnection srvConn,
                   java.lang.String serverName,
                   java.lang.String applicationName)

      Constructor for creating a client session

  - ### Method Detail

    - #### getApplicationName

          public final java.lang.String getApplicationName()

      Returns the name of the client. If the client runs as co-client on a server then this is the name of the server where it is running on.

    - #### clone

          public SessionId clone()

      Overrides:
        `clone` in class `TransferableObject`

    - #### deepClone

          public SessionId deepClone()

      Description copied from interface: `DeepCloneable`
      Returns a deep clone of this object
      Specified by:
        `deepClone` in interface `DeepCloneable`
      Overrides:
        `deepClone` in class `TransferableObject`

    - #### getServerName

          public final java.lang.String getServerName()

      Returns the name of the server this client is connected to

    - #### getHostAddress

          public final java.lang.String getHostAddress()

    - #### getHostName

          public final java.lang.String getHostName()

    - #### getSID

          public final int getSID()

    - #### getUrlId

          public final java.lang.String getUrlId()

    - #### isLoggedIn

          public final boolean isLoggedIn()

    - #### isAdmin

          public final boolean isAdmin()

    - #### getUserName

          public final java.lang.String getUserName()

    - #### getUID

          public final int getUID()

    - #### getUserId

          public final UserId getUserId()

    - #### setUserId

          public final void setUserId(UserId userId)

    - #### getWebId

          public final java.lang.String getWebId()

    - #### compareTo

          public int compareTo(java.lang.Object o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable`

    - #### getSessionInfo

          public java.lang.String getSessionInfo()

    - #### getUserInfo

          public java.lang.String getUserInfo()

    - #### getRenderIcon

          public javax.swing.Icon getRenderIcon()

      Specified by:
        `getRenderIcon` in interface `Renderable`

    - #### getRenderText

          public java.lang.String getRenderText()

      Specified by:
        `getRenderText` in interface `Renderable`

    - #### getRenderColor

          public java.awt.Color getRenderColor()

      Specified by:
        `getRenderColor` in interface `Renderable`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.