com.sas.hls.client
Class SessionFactory

java.lang.Object
  extended by com.sas.hls.client.SessionFactory

public final class SessionFactory
extends Object

Entry point into the API, this will create an authenticated session with the server instance.

Use the newSession(URL, String, String) method to begin a Session. With that Session you are connected to a server and have access to a number of services (retrieved via the ServiceManager).

Use the newSessionWithProxy(URL, String, String, ProxyInfo) method to begin a Session. With that Session you are connected to a server and have access to a number of services (retrieved via the ServiceManager).


Field Summary
static String SESSION_STRATEGY_SYSTEM_PROPERTY
          System property designating the session strategy instance to be used when creating and initializing Session objects.
 
Method Summary
static Session newSession(URL url, String userid, String password)
          Create an authenticated Session object to allow interaction with the server.
static Session newSessionWithProxy(URL url, String userId, String password, ProxyInfo proxyInfo)
          Create an authenticated Session object to allow interaction with the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_STRATEGY_SYSTEM_PROPERTY

public static final String SESSION_STRATEGY_SYSTEM_PROPERTY
System property designating the session strategy instance to be used when creating and initializing Session 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. See SessionStrategy for more information on this customization capability

See Also:
Constant Field Values
Method Detail

newSession

public static Session newSession(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 machine hosting the SAS Drug Development 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

newSessionWithProxy

public static Session newSessionWithProxy(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 machine hosting the SAS Drug Development instance
userId - user id of the user who is creating the session
password - password of the user who is creating the session
proxyInfo - proxy information required to access the url
Returns:
a fully initialized session object
Throws:
AuthenticationException - if the credentials were incorrect
Since:
1.7


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