final JISession session = new JISession (); session.sessionIdentifier = new Object ().hashCode () ^ (int)Runtime.getRuntime ().freeMemory () ^ randomGen.nextInt (); session.isSSO = true;
final JISession session = new JISession (); session.username = username; session.password = password;
JISession session = new JISession(); session.username = username; session.password = password;
JISession session = new JISession(); session.sessionIdentifier = new Object().hashCode() ^ (int)Runtime.getRuntime().freeMemory() ^ randomGen.nextInt(); session.isSSO = true;
JISession session = new JISession(); session.username = username; session.password = password;
/** * Creates a session with the <code>authInfo</code> of the user. This * session is not yet attached to a * COM server. * * @param authInfo * @return * @throws IllegalArgumentException * if <code>authInfo</code> is <code>null</code>. * @see JIComServer#JIComServer(JIClsid, JISession) * @see JIComServer#JIComServer(JIProgId, JISession) */ public static JISession createSession ( final IJIAuthInfo authInfo ) { if ( authInfo == null ) { throw new IllegalArgumentException ( JISystem.getLocalizedMessage ( JIErrorCodes.JI_AUTH_NOT_SUPPLIED ) ); } final JISession session = new JISession (); session.authInfo = authInfo; session.sessionIdentifier = authInfo.getUserName ().hashCode () ^ authInfo.getPassword ().hashCode () ^ authInfo.getDomain ().hashCode () ^ new Object ().hashCode () ^ (int)Runtime.getRuntime ().freeMemory () ^ randomGen.nextInt (); synchronized ( mutex ) { mapOfSessionIdsVsSessions.put ( new Integer ( session.sessionIdentifier ), session ); listOfSessions.add ( session ); } logger.info ( "Created Session: {}", session.sessionIdentifier ); return session; }
/** Creates a session with the <code>authInfo</code> of the user. This session is not yet attached to a * COM server. * * @param authInfo * @return * @throws IllegalArgumentException if <code>authInfo</code> is <code>null</code>. * @see JIComServer#JIComServer(JIClsid, JISession) * @see JIComServer#JIComServer(JIProgId, JISession) */ public static JISession createSession(IJIAuthInfo authInfo) { if (authInfo == null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_AUTH_NOT_SUPPLIED)); } JISession session = new JISession(); session.authInfo = authInfo; session.sessionIdentifier = authInfo.getUserName().hashCode() ^ authInfo.getPassword().hashCode() ^ authInfo.getDomain().hashCode() ^ new Object().hashCode() ^ (int)Runtime.getRuntime().freeMemory() ^ randomGen.nextInt(); synchronized (mutex) { mapOfSessionIdsVsSessions.put(new Integer(session.sessionIdentifier),session); listOfSessions.add(session); } if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().info("Created Session: " + session.sessionIdentifier); } return session; }
JISession session = new JISession();