# Class SessionId

java.lang.Object
com.databricks.jdbc.dbclient.impl.common.SessionId

public class SessionId extends Object
A Session-Id identifier to uniquely identify a connection session

## Constructor Summary

Constructors
Constructor
Description
`SessionId(THandleIdentifier identifier, IDatabricksComputeResource computeResource)`
Constructs a SessionId identifier for a given Thrift Server session-Id
`SessionId(String sessionId, IDatabricksComputeResource warehouseId)`
Constructs a SessionId identifier for a given SQL Exec session-Id

## Method Summary

Modifier and Type
Method
Description
`static SessionId`
`create(ImmutableSessionInfo sessionInfo)`
Creates a SessionId identifier for a given Thrift Server session-Id
`static SessionId`
`deserialize(String serializedSessionId)`
Deserializes a SessionId from a serialized string
`boolean`
`equals(Object otherSession)`
`DatabricksClientType`
`getClientType()`
Returns the client-type for the given session-Id
`ImmutableSessionInfo`
`getSessionInfo()`
Returns an ImmutableSessionInfo for the given session-Id
`String`
`toString()`

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

`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### SessionId

public SessionId(String sessionId, IDatabricksComputeResource warehouseId)
Constructs a SessionId identifier for a given SQL Exec session-Id

### SessionId

public SessionId(THandleIdentifier identifier, IDatabricksComputeResource computeResource)
Constructs a SessionId identifier for a given Thrift Server session-Id

## Method Details

### create

public static SessionId create(ImmutableSessionInfo sessionInfo)
Creates a SessionId identifier for a given Thrift Server session-Id

### deserialize

public static SessionId deserialize(String serializedSessionId) throws SQLException
Deserializes a SessionId from a serialized string

Throws:
  `SQLException`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### getSessionInfo

public ImmutableSessionInfo getSessionInfo()
Returns an ImmutableSessionInfo for the given session-Id

### getClientType

public DatabricksClientType getClientType()
Returns the client-type for the given session-Id

### equals

public boolean equals(Object otherSession)

Overrides:
  `equals` in class `Object`