public class APISession extends Object implements ISession
Modifier and Type | Field and Description |
---|---|
static int |
MAJOR_VERSION |
static int |
MINOR_VERSION |
static String |
PLUGIN_VERSION_PREFIX |
static String |
VERSION |
Modifier and Type | Method and Description |
---|---|
void |
checkifAlive() |
void |
close() |
static ISession |
create(IntegrityConfigurable settings)
Creates an authenticated API Session against the Integrity Server
|
static ISession |
createLocalIntegrationPoint(IntegrityConfigurable settings)
Creates a local integration point
|
String |
getUserName()
Returns the Integrity User for this APISession
|
void |
ping() |
void |
refreshAPISession() |
com.mks.api.response.Response |
runCommand(com.mks.api.Command cmd)
This function executes a generic API/CLI Command
|
com.mks.api.response.Response |
runCommandAs(com.mks.api.Command cmd,
String impersonateUser)
This function executes a generic API/CLI Command impersonating another user
|
com.mks.api.response.Response |
runCommandWithInterim(com.mks.api.Command cmd)
This function executes a generic API/CLI Command with interim
|
boolean |
terminate()
Terminate the API Session and Integration Point
|
String |
toString() |
public static final String VERSION
public static final int MAJOR_VERSION
public static final int MINOR_VERSION
public static final String PLUGIN_VERSION_PREFIX
public static ISession create(IntegrityConfigurable settings)
public static ISession createLocalIntegrationPoint(IntegrityConfigurable settings)
settings
- public void ping() throws com.mks.api.response.APIException
public com.mks.api.response.Response runCommand(com.mks.api.Command cmd) throws com.mks.api.response.APIException
runCommand
in interface ISession
cmd
- Integrity API Command Object representing a CLI commandcom.mks.api.response.APIException
public com.mks.api.response.Response runCommandWithInterim(com.mks.api.Command cmd) throws com.mks.api.response.APIException
runCommandWithInterim
in interface ISession
cmd
- Integrity API Command Object representing a CLI commandcom.mks.api.response.APIException
public com.mks.api.response.Response runCommandAs(com.mks.api.Command cmd, String impersonateUser) throws com.mks.api.response.APIException
cmd
- Integrity API Command Object representing a CLI commandimpersonateUser
- The user to impersonatecom.mks.api.response.APIException
public void refreshAPISession() throws com.mks.api.response.APIException
refreshAPISession
in interface ISession
com.mks.api.response.APIException
public boolean terminate()
public String getUserName()
getUserName
in interface ISession
public void close()
close
in interface AutoCloseable
public void checkifAlive() throws com.mks.api.response.APIException
checkifAlive
in interface ISession
com.mks.api.response.APIException
Copyright © 2016–2024. All rights reserved.