Package 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
,java.io.Serializable
,java.rmi.Remote
public class SessionFactoryImpl extends APIRemoteObject implements SessionFactory
This class implements methods for creating remote Session.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SessionFactoryImpl
createInstance()
Creates new instance of this class.Session
createSession()
Creates a session object.Session
createSession(java.lang.String aUserName, java.lang.String aPassword)
Creates a session object with the specified username and password.-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
-
-
-
Method Detail
-
createSession
public Session createSession() throws DIException, java.rmi.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 interfaceSessionFactory
- Returns:
- The Session object.
- Throws:
DIException
- if an error occurs while creating Session.java.rmi.RemoteException
- if a communication-related exception occurs.
-
createSession
public Session createSession(java.lang.String aUserName, java.lang.String aPassword) throws DIException, java.rmi.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 interfaceSessionFactory
- Parameters:
aUserName
- the username for authentication.aPassword
- the password for authentication.- Returns:
- The Session object.
- Throws:
DIException
- if an error occurs while creating Session.java.rmi.RemoteException
- if a communication-related exception occurs.
-
createInstance
public static SessionFactoryImpl createInstance() throws DIException, java.rmi.RemoteException
Creates new instance of this class.- Returns:
- SessionFactoryImpl object
- Throws:
DIException
- if Runtime or Security exception occurs.java.rmi.RemoteException
- if a communication-related exception occurs.
-
-