Decision Center API

ilog.rules.teamserver.client
Class IlrRemoteSessionFactory

java.lang.Object
  extended by ilog.rules.teamserver.client.IlrRemoteSessionFactory
All Implemented Interfaces:
IlrSessionFactory, Serializable

public class IlrRemoteSessionFactory
extends Object
implements IlrSessionFactory

A remote implementation of a session factory.

See Also:
Serialized Form

Constructor Summary
IlrRemoteSessionFactory()
           
 
Method Summary
 void connect(AuthenticationCredentials credentials, String url, String datasource)
          Establishes a connection to Decision Center.
 void connect(String username, String password, String url, String dataSourceName)
          Connects the given user to Decision Center.
 IlrSession getSession()
          Returns the session created by the connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrRemoteSessionFactory

public IlrRemoteSessionFactory()
Method Detail

getSession

public IlrSession getSession()
Description copied from interface: IlrSessionFactory
Returns the session created by the connection.

Specified by:
getSession in interface IlrSessionFactory
Returns:
A session, or null if no user is connected or if the connection failed.

connect

public void connect(AuthenticationCredentials credentials,
                    String url,
                    String datasource)
             throws IlrConnectException
Description copied from interface: IlrSessionFactory
Establishes a connection to Decision Center. When using this method, the credentials are passed to an implementation of AuthenticationHandler that is responsible for the connection.

You have two options to set the handler:

Once connected, getSession will return a session associated with this user.

Specified by:
connect in interface IlrSessionFactory
Throws:
IlrConnectException - If the connection failed.
Parameters:
credentials - The credentials to use for the connection.
url - The URL of the application server.
datasource - The name of the data source. If null, the default name is jdbc/ilogDataSource.
See Also:
Connecting to Decision Center, IlrSession.getUserName(), AuthenticationCredentials, AuthenticationHandler

connect

public void connect(String username,
                    String password,
                    String url,
                    String dataSourceName)
             throws IlrConnectException
Description copied from interface: IlrSessionFactory
Connects the given user to Decision Center.

Once connected, getSession will return a session associated with this user.

Specified by:
connect in interface IlrSessionFactory
Throws:
IlrConnectException - If the connection failed.
Parameters:
username - The user name.
password - The user password.
url - The URL of the application server.
dataSourceName - The name of the data source. If null, the default name is jdbc/ilogDataSource.
See Also:
Connecting to Decision Center, IlrSession.getUserName()

Decision Center API

© Copyright IBM Corp. 1987, 2013