1010Data Insights Platform .NET SDK
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
TenTenSDK.Session Class Reference

A connection to the 1010data Insights Platform. More...

Inheritance diagram for TenTenSDK.Session:

Public Member Functions

 Session (Uri uri, String owner, String group, String password, LoginType type, String logPath=null, bool append=false, int retries=Int32.MaxValue, int waitsec=10)
 Constructs a session by logging into a SAM pool, which is a group pool of IDs. More...
 
 Session (Uri uri, String username, String password, LoginType type, String logPath=null, bool append=false)
 Constructs a session with a non-pool login. More...
 
 Session (Uri uri, String username, String encryptedPassword, String sessionID, String logPath=null, bool append=false)
 Constructs a session by duplicating a previous session. More...
 
void Dispose ()
 Cleans up the session. This is important if you're not working with the Using keyword.
 
void ClearCache ()
 Clears the session's cache.
 
void FlushPool ()
 Flush the pool this session is using.
 
Table RunQuery (Query query)
 Runs a query on this session. More...
 
Table OpenTable (String tablePath)
 Opens a table at the specific path. More...
 

Static Public Member Functions

static void Authenticate (Uri uri, String username, String password)
 Authenticates a user/uri with a password. More...
 
static void FlushPool (Uri uri, String owner, String groupname, String password)
 Flushes the SAM pool. This ensures that usernames returned from this point on are fresh and not already logged in. More...
 
static void ResetPool (Uri uri, String owner, String groupname, String password)
 
static int WarmPool (Uri uri, String owner, String groupname, String password, Query[] queries=null)
 Warm a SAM pool. More...
 

Public Attributes

readonly long SessionIndex
 Unique index for this session (starts counting from 1).
 

Properties

static IDownloadPolicy SystemPolicy [get, set]
 Default Download for newly created policies. More...
 
IDownloadPolicy SessionPolicy [get, set]
 Session download policy.
 
TransferMode Mode [get, set]
 TransferMode of the session.
 
int ReturnCode [get]
 Return code for the last transaction performed on this session. More...
 
String Message [get]
 Message returned by the last transaction performed on ths session.
 
String Log [set]
 Sets where session transactions are logged.
 
String EncryptedPassword [get]
 The encrypted password; this can be used with TenUp.
 
String Passphrase [set]
 Passphrase for this session; null removes the passphrase.
 
String SessionID [get]
 Gets the SessionID for later use.
 
String UserID [get]
 Gets the current UserID.
 

Detailed Description

A connection to the 1010data Insights Platform.

Constructor & Destructor Documentation

TenTenSDK.Session.Session ( Uri  uri,
String  owner,
String  group,
String  password,
LoginType  type,
String  logPath = null,
bool  append = false,
int  retries = Int32.MaxValue,
int  waitsec = 10 
)
inline

Constructs a session by logging into a SAM pool, which is a group pool of IDs.

Parameters
uriUri to login with
ownerThe username of the owner of the group
groupThe groupID
passwordThe group owner password
typeThe login type, which indicates what to do if logging into an active session
logPathThe initial path to log to (null means no logging) LOGGING CURRENTLY DISABLED
appendIf logging should append or not
TenTenSDK.Session.Session ( Uri  uri,
String  username,
String  password,
LoginType  type,
String  logPath = null,
bool  append = false 
)
inline

Constructs a session with a non-pool login.

Parameters
uriUri to login with
usernameUsername to log in with
passwordUser's password
typeThe login type, which indicates what to do if logging into an active session
logPathThe initial path to log to (null means no logging) LOGGING CURRENTLY DISABLED
appendIf logging should append or not
TenTenSDK.Session.Session ( Uri  uri,
String  username,
String  encryptedPassword,
String  sessionID,
String  logPath = null,
bool  append = false 
)
inline

Constructs a session by duplicating a previous session.

Parameters
uriUri to login with
usernameUsername to log in with
encryptedPasswordUser's encrypted password
sessionIDThe ID of the session to duplicate
logPathThe initial path to log to (null means no logging) LOGGING CURRENTLY DISABLED
appendIf logging should append or not

Member Function Documentation

static void TenTenSDK.Session.Authenticate ( Uri  uri,
String  username,
String  password 
)
inlinestatic

Authenticates a user/uri with a password.

Parameters
uriGateway to authenticate with
usernameUsername of user to authenticate
passwordUser's password
Exceptions
InvalidCredentialExceptionon failure (i.e. bad password).
static void TenTenSDK.Session.FlushPool ( Uri  uri,
String  owner,
String  groupname,
String  password 
)
inlinestatic

Flushes the SAM pool. This ensures that usernames returned from this point on are fresh and not already logged in.

Parameters
uriThe URI for the 1010 connection.
ownerThe owner of the group.
groupnameThe group to be flushed.
passwordPassword for the owner ID.
static void TenTenSDK.Session.ResetPool ( Uri  uri,
String  owner,
String  groupname,
String  password 
)
inlinestatic

Reset a SAM pool. This will log out and release all userIDs in the pool. Only use this if you have exclusive access to this SAM pool it will release UIDs that could otherwise be in use. Mostly intended for the development cycle.

Parameters
uriThe URI for the 1010 connection.
ownerThe owner of the group.
groupnameThe group to be reset.
passwordPassword for the owner ID.
static int TenTenSDK.Session.WarmPool ( Uri  uri,
String  owner,
String  groupname,
String  password,
Query[]  queries = null 
)
inlinestatic

Warm a SAM pool.

Parameters
uriThe URI for the 1010 connection
ownerthe owner of the group
groupnameThe group to be warmed
passwordPassword for the group
queriesAn optional array of Query objects, which will each be run in all the warmed sessions.
Returns
Number of users warmed.
Table TenTenSDK.Session.RunQuery ( Query  query)
inline

Runs a query on this session.

Parameters
queryThe query object
Returns
A table representing the query results
Table TenTenSDK.Session.OpenTable ( String  tablePath)
inline

Opens a table at the specific path.

Parameters
tablePathThe table to open
Returns
A table at the given path

Property Documentation

IDownloadPolicy TenTenSDK.Session.SystemPolicy
staticgetset

Default Download for newly created policies.

Note that mutating this with SetPolicies will not change the policies of already created sessions.

int TenTenSDK.Session.ReturnCode
get

Return code for the last transaction performed on this session.

Exceptions
TenTenSDKExceptionIF there's an issue getting the return code.

The documentation for this class was generated from the following file: