|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jinterop.dcom.core.JISession
public final class JISession
Class representing the user's session. Each IJIComObject
is associated with 1 session only.
All Interface references being given out by the library for a particular COM server are maintained
by the session. It is also responsible for the clean up once the system shuts down or objects loose there
references.
Please make sure that you call JISession.destroySession after you are done using the session. This will ensure that any
open sockets to COM server are closed.
Method Summary | |
---|---|
static JISession |
createSession(IJIAuthInfo authInfo)
Creates a session with the authInfo of the user. |
static JISession |
createSession(JISession session)
Creates a new Session , using credentials of the session sent as parameter. |
static JISession |
createSession(java.lang.String domain,
java.lang.String username,
java.lang.String password)
Creates a session. |
static void |
destroySession(JISession session)
Used to destroy the session, this release all references of the COM server and it's interfaces. |
IJIAuthInfo |
getAuthInfo()
Returns the authInfo (if any) associated with this session. |
java.lang.String |
getDomain()
Gets the domain of the user associated with this session. |
int |
getGlobalSocketTimeout()
Returns the global timeout applied to all sockets opened from this session to COM Server. |
int |
getSessionIdentifier()
Returns a unique identifier for this session. |
java.lang.String |
getUserName()
Gets the username associated with this session. |
void |
setGlobalSocketTimeout(int timeout)
Sets the timeout for all sockets opened to (not fro) the COM server for this session. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public IJIAuthInfo getAuthInfo()
public static JISession createSession(IJIAuthInfo authInfo)
authInfo
-
public static JISession createSession(java.lang.String domain, java.lang.String username, java.lang.String password)
domain
- Domain of the user.username
- Usernamepassword
- password of the user.
public static JISession createSession(JISession session)
session
-
public static void destroySession(JISession session) throws JIException
Used to destroy the session, this release all references of the COM
server and it's interfaces.
It should be called once the developer is done with the usage of a COM
object, it is required so as to close all open sockets
with the COM server. The references to COM interfaces are discarded from time to time when a random GC is done or when the system shuts down.
session
-
JIException
public java.lang.String getUserName()
public java.lang.String getDomain()
public int getSessionIdentifier()
public void setGlobalSocketTimeout(int timeout)
Sets the timeout for all sockets opened to (not fro) the COM server for this session. Default value is 0 (no timeout). The class level and the API level settings in case of IJIComObject override this timeout.
timeout
- in millisecspublic int getGlobalSocketTimeout()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |