Package com.sas.lsaf.client
Interface SessionStrategy
-
public interface SessionStrategy
Strategy interface that allows consumers the ability to createClientSession
instances. It is not expected that most consumers will provide alternate session strategy implementations, but if required, this allows customization ofClientSession
lifecycles.Note: if a session timeout occurs or the session is no longer available, a org.springframework.remoting.RemoteAccessException will be thrown on any API service method call.
- Since:
- 1.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClientSession
logon(java.net.URL url, java.lang.String userId, byte[] password)
Create an authenticatedClientSession
object to allow interaction with the server.ClientSession
logon(java.net.URL url, java.lang.String userId, byte[] password, ProxyInfo proxyInfo)
Create an authenticatedClientSession
object to allow interaction with the server.
-
-
-
Method Detail
-
logon
ClientSession logon(java.net.URL url, java.lang.String userId, byte[] password) throws AuthenticationException
Create an authenticatedClientSession
object to allow interaction with the server. This method uses the specified server URL and credentials when establishing the connection.The password supplied here can be clear text or an encrypted password that was encrypted using
UserService.encryptPassword(byte[])
. Only the API supports encrypted passwords. The encrypted password should not be used to log on to the system interactively.- Parameters:
url
- the url of the server hosting the application instance.userId
- the user ID of the user who is creating the session.password
- the password of the user who is creating the session.- Returns:
- a fully initialized session object.
- Throws:
AuthenticationException
- thrown if the credentials were incorrect.- Since:
- 1.1
-
logon
ClientSession logon(java.net.URL url, java.lang.String userId, byte[] password, ProxyInfo proxyInfo) throws AuthenticationException
Create an authenticatedClientSession
object 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 here can be clear text or an encrypted password that was encrypted using
UserService.encryptPassword(byte[])
. Only the API supports encrypted passwords. The encrypted password should not be used to log on to the system interactively.- Parameters:
url
- the url of the server hosting the application instance.userId
- the user ID of the user who is creating the session.password
- the password of the user who is creating the session.proxyInfo
- the proxy server information and proxy credentials (if required) to access the server.- Returns:
- a fully initialized session object.
- Throws:
AuthenticationException
- thrown if the credentials were incorrect.- Since:
- 1.7
-
-