com.sas.hls.client
Interface SessionStrategy


public interface SessionStrategy

Strategy interface which allows consumers the ability to create Session instances. It is not expected that most consumers will provide alternate SessionStrategy implementations, but if required, this allows customization of Session 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.


Method Summary
 Session openSession(URL url, String userid, String password)
          Create an authenticated Session object to allow interaction with the server.
 Session openSessionWithProxy(URL url, String userid, String password, ProxyInfo proxyInfo)
          Create an authenticated Session object to allow interaction with the server.
 

Method Detail

openSession

Session openSession(URL url,
                    String userid,
                    String password)
                    throws AuthenticationException
Create an authenticated Session object to allow interaction with the server. This method uses the specified server URL and credentials when establishing the connection.

Parameters:
url - url of the server hosting the application instance
userid - userid of the user who is creating the session
password - 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

openSessionWithProxy

Session openSessionWithProxy(URL url,
                             String userid,
                             String password,
                             ProxyInfo proxyInfo)
                             throws AuthenticationException
Create an authenticated Session 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.

Parameters:
url - url of the server hosting the application instance
userid - userid of the user who is creating the session
password - password of the user who is creating the session
Returns:
a fully initialized session object
Throws:
AuthenticationException - if the credentials were incorrect
Since:
1.7


Copyright (c) 2014, SAS Institute Inc., Cary, NC, USA