public interface SasSessionService
Modifier and Type | Method and Description |
---|---|
void |
deleteSession(String identifier,
boolean forceCleanup)
Delete a single SAS session with the option to forceCleanup which will force kill the remote SAS process, if necessary, and cleanup
the transient workspace, if it exists.
|
void |
deleteSessions(List<SasSession> sessions,
boolean forceCleanup)
Delete the specified SAS sessions with the option to forceCleanup which will force kill the remote SAS processes, if necessary, and cleanup
the transient workspaces, if they exist.
|
SasSession |
endSession(String identifier)
End a SAS session for the specified SAS session.
|
List<SasSession> |
getAllSessions()
Get a list of all SAS sessions for all users in the system.
|
String |
getListingContents(String identifier)
Get the listing contents for the specified SAS session if the size of the file does not exceed 5 megabytes (5242880 bytes).
|
long |
getListingSize(String identifier)
Get the size of the listing file for the specified SAS session in bytes.
|
String |
getLogContents(String identifier)
Get the log contents for the specified SAS session if the size of the file does not exceed 5 megabytes (5242880 bytes).
|
long |
getLogSize(String identifier)
Get the size of the log file for the specified SAS session in bytes.
|
SasSession |
getSession(String identifier)
Get the SAS session with the specified identifier.
|
List<SasSession> |
getSessionsByUser(String userId)
Get a list of SAS sessions for the user with the userId specified.
|
List<SasSession> |
getSessionsForCurrentUser()
Get a list of SAS sessions for the current user.
|
WorkspaceResource |
saveListingToCurrentUserWorkspace(String identifier,
String lstPath)
Save the listing file for the specified SAS session to the current user's workspace in the specified location.
|
WorkspaceResource |
saveLogToCurrentUserWorkspace(String identifier,
String logPath)
Save the log file for the specified SAS session to the current user's workspace in the specified location.
|
void deleteSession(String identifier, boolean forceCleanup) throws SessionNotFoundException, SessionException
SasSession.SessionState.BROKEN
or
SasSession.SessionState.ENDED
can be deleted, so if the session is not broken or ended, it will be ended prior to deleting.identifier
- the identifier representing the SAS sessionforceCleanup
- whether to force kill the remote SAS process, if necessary, and cleanup the transient workspace on the OS, if it exists.SessionNotFoundException
- thrown if the SAS session does not exist with the specified identifierSessionException
- thrown if there was an issue deleting the SAS Session from the systemSasSession endSession(String identifier) throws SessionNotFoundException, SessionException
identifier
- the identifier representing the SAS sessionSessionNotFoundException
- thrown if the SAS session does not exist with the specified identifierSessionException
- thrown if there was an issue ending the SAS Sessionvoid deleteSessions(List<SasSession> sessions, boolean forceCleanup)
SasSession.SessionState.BROKEN
or
SasSession.SessionState.ENDED
can be deleted, so if the session is not broken or ended, it will be ended prior to deleting.sessions
- the SAS sessions to deleteforceCleanup
- whether to force kill the remote SAS process, if necessary, and cleanup the transient workspace on the OS, if it exists.List<SasSession> getAllSessions()
List<SasSession> getSessionsForCurrentUser()
SasSession getSession(String identifier) throws SessionNotFoundException
identifier
- the identifier representing the SAS sessionSessionNotFoundException
- thrown if the SAS session does not exist with the specified identifierString getLogContents(String identifier) throws SessionNotFoundException, WorkspaceResourceNotFoundException
identifier
- the identifier representing the SAS sessionSessionNotFoundException
- thrown if the SAS session does not exist with the specified identifierWorkspaceResourceNotFoundException
- thrown if there was an issue getting the contents of the filelong getLogSize(String identifier) throws SessionNotFoundException, WorkspaceResourceNotFoundException
identifier
- the identifier representing the SAS sessionSessionNotFoundException
- thrown if the SAS session does not exist with the specified identifierWorkspaceResourceNotFoundException
- thrown if there was an issue getting the size of the fileString getListingContents(String identifier) throws SessionNotFoundException, WorkspaceResourceNotFoundException
identifier
- the identifier representing the SAS sessionSessionNotFoundException
- thrown if the SAS session does not exist with the specified identifierWorkspaceResourceNotFoundException
- thrown if there was an issue getting the contents of the filelong getListingSize(String identifier) throws SessionNotFoundException, WorkspaceResourceNotFoundException
identifier
- the identifier representing the SAS sessionSessionNotFoundException
- thrown if the SAS session does not exist with the specified identifierWorkspaceResourceNotFoundException
- thrown if there was an issue getting the size of the fileList<SasSession> getSessionsByUser(String userId)
userId
- userId for the user who started the SAS sessionWorkspaceResource saveLogToCurrentUserWorkspace(String identifier, String logPath) throws SessionNotFoundException, WorkspaceResourceNotFoundException, WorkspaceResourceCopyException, WorkspaceResourceExistsException
identifier
- the identifier representing the SAS sessionlogPath
- full path of destination log fileSessionNotFoundException
- thrown if the SAS session does not existWorkspaceResourceNotFoundException
- thrown if there was an issue getting the contents of the log file or the destination does not existWorkspaceResourceCopyException
- thrown if there was an error copying the file to the specified locationWorkspaceResourceExistsException
- thrown if resource already exists at the destination path.WorkspaceResource saveListingToCurrentUserWorkspace(String identifier, String lstPath) throws SessionNotFoundException, WorkspaceResourceNotFoundException, WorkspaceResourceCopyException, WorkspaceResourceExistsException
identifier
- the identifier representing the SAS sessionlstPath
- full path of destination listing fileSessionNotFoundException
- thrown if the SAS session does not existWorkspaceResourceNotFoundException
- thrown if there was an issue getting the contents of the listing file or the destination does not existWorkspaceResourceCopyException
- thrown if there was an error copying the file to the specified locationWorkspaceResourceExistsException
- thrown if resource already exists at the destination path.Copyright (c) 2017, SAS Institute Inc., Cary, NC, USA