code: @Override
    public AppSession getSession(String sessionId, Class<? extends AppSession> aClass) {
      if (sessionId == null) {
        throw new IllegalArgumentException("SessionId must not be null");
      }
      if (!this.iss.exists(sessionId)) {
        return null;
      }
      AppSession appSession = null;
      try {
        if (aClass == ServerRfSession.class) {
          IServerRfSessionData sessionData = (IServerRfSessionData) this.sessionDataFactory.getAppSessionData(ServerRfSession.class, sessionId);
          // FIXME: determine how to get boolean flag!
          ServerRfSessionImpl session = new ServerRfSessionImpl(sessionData, sessionFactory, getServerSessionListener(), getServerContextListener(),
              getStateListener(), messageTimeout, true);
  
          session.getSessions().get(0).setRequestListener(session);
          appSession = session;
        }
        else if (aClass == ClientRfSession.class) {
          IClientRfSessionData sessionData = (IClientRfSessionData) this.sessionDataFactory.getAppSessionData(ClientRfSession.class, sessionId);
          ClientRfSessionImpl session = new ClientRfSessionImpl(sessionData, sessionFactory, getClientSessionListener(), getClientContextListener(),
              getStateListener(), this.getApplicationId());
  
          session.getSessions().get(0).setRequestListener(session);
          appSession = session;
        }
        else {
          throw new IllegalArgumentException("Wrong session class: " + aClass + ". Supported[" + ClientRfSession.class + "," + ServerRfSession.class + "]");
        }
      }
      catch (Exception e) {
        logger.error("Failure to obtain new Rf Session.", e);
      }
  
      return appSession;
    }
docs: ------------------------------------------------------