Package com.sas.lsaf.client
Class SessionFactory
- java.lang.Object
-
- com.sas.lsaf.client.SessionFactory
-
public final class SessionFactory extends java.lang.Object
An entry point into the API, this will create an authenticated session with the server instance.Use the
logon(URL, String, byte[])
method to begin aClientSession
. With that ClientSession you are connected to a server and have access to a number of services (retrieved via theServiceManager
).Use the
logon(URL, String, byte[], ProxyInfo)
method to begin aClientSession
when a proxy server is used to access the target server. With that ClientSession you are connected to a server and have access to a number of services (retrieved via theServiceManager
).- Since:
- 1.1
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SESSION_STRATEGY_SYSTEM_PROPERTY
System property designating the session strategy instance to be used when creating and initializing ClientSession objects.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ClientSession
logon(java.net.URL url, java.lang.String userid, byte[] password)
Create an authenticatedClientSession
to allow interaction with the server.static ClientSession
logon(java.net.URL url, java.lang.String userId, byte[] password, ProxyInfo proxyInfo)
Create an authenticatedClientSession
to allow interaction with the server.
-
-
-
Field Detail
-
SESSION_STRATEGY_SYSTEM_PROPERTY
public static final java.lang.String SESSION_STRATEGY_SYSTEM_PROPERTY
System property designating the session strategy instance to be used when creating and initializing ClientSession objects. If this is not used then a default strategy will be used. Note: it is expected that most users will not need to provide a customized strategy and will create sessions in the supplied, default manner. SeeSessionStrategy
for more information on this customization capability- See Also:
- Constant Field Values
-
-
Method Detail
-
logon
public static ClientSession logon(java.net.URL url, java.lang.String userid, byte[] password) throws AuthenticationException
Create an authenticatedClientSession
to allow interaction with the server. This method uses the specified server URL and credentials when establishing the connection.
The password supplied can be clear text or an encrypted password that was encrypted usingUserService.encryptPassword(byte[])
. Only the API supports encrypted passwords. The encrypted password should not be used to log in to the system interactively.- Parameters:
url
- url of machine hosting the SAS Life Science Analytics Framework instanceuserid
- userid of the user who is creating the sessionpassword
- password of the user who is creating the session- Returns:
- a fully initialized session object
- Throws:
AuthenticationException
- if the credentials were incorrect- Since:
- 1.1
-
logon
public static ClientSession logon(java.net.URL url, java.lang.String userId, byte[] password, ProxyInfo proxyInfo) throws AuthenticationException
Create an authenticatedClientSession
to allow interaction with the server. This method uses the specified server URL, credentials and proxy server information when establishing the connection. This method should only be used when a proxy server is required to access the specified server URL.
The password supplied can be clear text or an encrypted password that was encrypted usingUserService.encryptPassword(byte[])
. Only the API supports encrypted passwords. The encrypted password should not be used to log in to the system interactively.- Parameters:
url
- url of machine hosting the SAS Life Science Analytics Framework instanceuserId
- user id of the user who is creating the sessionpassword
- password of the user who is creating the sessionproxyInfo
- proxy information required to access the url- Returns:
- a fully initialized session object
- Throws:
AuthenticationException
- if the credentials were incorrect- Since:
- 1.7
-
-