Package com.sas.lsaf.client
Interface SessionStrategy
public interface SessionStrategy
Strategy interface that allows consumers the ability to create
ClientSession instances. It is not expected that
most consumers will provide alternate session strategy implementations, but if required, this allows customization of
ClientSession 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
Modifier and TypeMethodDescriptionCreate an authenticatedClientSessionobject to allow interaction with the server.Create an authenticatedClientSessionobject to allow interaction with the server.
-
Method Details
-
logon
Create an authenticatedClientSessionobject 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(URL url, String userId, byte[] password, ProxyInfo proxyInfo) throws AuthenticationException Create an authenticatedClientSessionobject 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
-