com.ibm.di.api.remote
Interface SessionFactory

All Superinterfaces:
Remote
All Known Implementing Classes:
SessionFactoryImpl

public interface SessionFactory
extends Remote

This interface provides methods for creating a Session.


Method Summary
 Session createSession()
          Creates a session object.
 Session createSession(String aUserName, String aPassword)
          Creates a session object with the specified username and password.
 

Method Detail

createSession

Session createSession()
                      throws DIException,
                             RemoteException
Creates a session object.

Example:

 var sf = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory");
 var session = sf.createSession();
 task.logmsg("OS: " + session.getServerInfo().getOperatingSystem());
 

Returns:
The Session object.
Throws:
DIException - if an error occurs while creating Session.
RemoteException - if a communication-related exception occurs.

createSession

Session createSession(String aUserName,
                      String aPassword)
                      throws DIException,
                             RemoteException
Creates a session object with the specified username and password.

Example:

 var nick = "Username";
 var pass = "Difficult password";
 var sf = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory");
 var session = sf.createSession();
 task.logmsg("OS: " + session.getServerInfo().getOperatingSystem());
 

Parameters:
aUserName - the username for authentication.
aPassword - the password for authentication.
Returns:
The Session object.
Throws:
DIException - if an error occurs while creating Session.
RemoteException - if a communication-related exception occurs.