com.ibm.di.api.remote.impl
Class SessionFactoryImpl
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.ibm.di.api.remote.impl.APIRemoteObject
com.ibm.di.api.remote.impl.SessionFactoryImpl
All Implemented Interfaces: SessionFactory , Serializable , Remote
public class SessionFactoryImpl extends APIRemoteObject implements SessionFactory
This class implements methods for creating remote Session.
See Also: Serialized Form
createSession
public 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());
Specified by: createSession
in interface SessionFactory
Returns: The Session object.
Throws:
DIException
- if an error occurs while creating Session.
RemoteException
- if a communication-related exception occurs.
createSession
public 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());
Specified by: createSession
in interface SessionFactory
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.
createInstance
public static SessionFactoryImpl createInstance ()
throws DIException ,
RemoteException
Creates new instance of this class.
Returns: SessionFactoryImpl object
Throws:
DIException
- if Runtime or Security exception occurs.
RemoteException
- if a communication-related exception occurs.