public AppSession getNewSession(String sessionId, Class<? extends AppSession> aClass, ApplicationId applicationId, Object[] args) { AppSession session = super.getNewSession(sessionId, aClass, applicationId, args); if (aClass == ServerAuthSession.class) { ServerAuthSessionImpl serverAuthSession = (ServerAuthSessionImpl)session; return serverAuthSession; } else if (aClass == ClientAuthSession.class) { ClientAuthSessionImpl clientAuthSession = (ClientAuthSessionImpl)session; return clientAuthSession; } return null; }
if (aClass == ServerAuthSession.class) { IServerAuthSessionData sessionData = (IServerAuthSessionData) this.sessionDataFactory.getAppSessionData(ServerAuthSession.class, sessionId); ServerAuthSessionImpl session = new ServerAuthSessionImpl(sessionData, sessionFactory, getServerSessionListener(), getMessageFactory(), getStateListener(), getServerSessionContext(), messageTimeout, isStateles()); if (aClass == ClientAuthSession.class) { IClientAuthSessionData sessionData = (IClientAuthSessionData) this.sessionDataFactory.getAppSessionData(ClientAuthSession.class, sessionId); ClientAuthSessionImpl session = new ClientAuthSessionImpl(sessionData, sessionFactory, getClientSessionListener(), getMessageFactory(), getStateListener(), getClientSessionContext(), isStateles());
ServerAuthSessionImpl session = new ServerAuthSessionImpl(sessionData, sessionFactory, getServerSessionListener(), getMessageFactory(), getStateListener(), getServerSessionContext(), messageTimeout, isStateles()); ClientAuthSessionImpl session = new ClientAuthSessionImpl(sessionData, sessionFactory, getClientSessionListener(), getMessageFactory(), getStateListener(), getClientSessionContext(), isStateles());