/*
(non-Javadoc)

@see javax.servlet.http.HttpServletRequest#getSession()
779752
@Override
    public HttpSession getSession() {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getSession();
        } finally {
            collaborator.postInvoke();
        }
    }
278822
public Integer getSessionTimeout()
   {
      if (childNode.getTextValueForPatternName("session-timeout") != null && !childNode.getTextValueForPatternName("session-timeout").equals("null")) {
         return Integer.valueOf(childNode.getTextValueForPatternName("session-timeout"));
      }
      return null;
   }
1159974
public static HttpSession getHttpSession()
	{
		final HttpServletRequest request = WicketComponentExtensions.getHttpServletRequest();
		if (request != null)
		{
			final HttpSession session = request.getSession(false);
			if (session != null)
			{
				return session;
			}
		}
		return null;
	}
1277385
public function getSession()
    {
        if (null === $this->requestStack) {
            throw new \RuntimeException('The "app.session" variable is not available.');
        }

        if ($request = $this->getRequest()) {
            return $request->getSession();
        }
    }
750118
private SMPPSession getSession() throws IOException {
    if (session == null) {
      LOGGER.info("Initiate session for the first time to {}:{}", remoteIpAddress, remotePort);
      session = newSession();
    }
    else if (!session.getSessionState().isBound()) {
      throw new IOException("We have no valid session yet");
    }
    return session;
  }
117342
public HttpSession getSession(boolean arg0) {
		final HttpSession httpSession = request.getSession(arg0);
		if (httpSession == null) {
			return null;
		}
		else {
			return new HttpSessionWrapper(httpSession);
		}
	}
1088177
protected final AbstractSession getSession() throws JMSException
    {
        if (sessionRef == null)
            throw new FFMQException("Message has no associated session","CONSISTENCY");
        
        AbstractSession session = sessionRef.get();
        if (session == null)
            throw new FFMQException("Message session is no longer valid","CONSISTENCY");
        
        return session;
    }
599287
public function getSession()
    {
        if ($this->_oSessionObject === null) {
            $this->_oSessionObject = oxRegistry::getSession();
        }

        return $this->_oSessionObject;
    }
1078579
private JPanel getPanelSession() {
		if (panelSession == null) {

			panelSession = new JPanel();
			panelSession.setLayout(new BorderLayout());
			panelSession.setName("SessionTech");
			panelSession.add(getTechTree(), BorderLayout.CENTER);
		}
		return panelSession;
	}
1057819
@Override
    public StringBuffer getRequestURL() {
        // strip off any session id from the url here
        String rc = SessionInfo.stripURL(this.request.getURL(),
                                         this.sessionData);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getRequestURL: " + rc);
        }
        return new StringBuffer(rc);
    }
777323
protected function getSession()
    {
        if (null === $this->session) {
            if (null !== $this->getRequest()) {
                $this->session = $this->request->getSession();
            }
        }

        return $this->session;
    }
925858
public Session getSession() throws ControlException {
        if (_session == null) {
            try {
                switch (getDestinationType()) {
                    case Auto:
                        determineDestination();
                        return getSession();
                    case Topic:
                        createTopicSession();
                        break;
                    case Queue:
                        createQueueSession();
                        break;
                }
            }
            catch (JMSException e) {
                throw new ControlException("Failure to get JMS connection or session", e);
            }
        }
        return _session;
    }
74146
@Override
    public String getRequestURI() {
        if (null == this.strippedURI) {
            this.strippedURI = SessionInfo.stripURL(this.request.getURI(), this.sessionData);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getRequestURI: " + this.strippedURI);
        }
        return this.strippedURI;
    }
22659
public HttpSession getSession(boolean create)
    {
        // 321485
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getSession", "create " + String.valueOf(create) + ", this -> "+this);
        }
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        // return _connContext.getSessionAPISupport().getSession(create);
        return _requestContext.getSession(create, ((WebAppDispatcherContext) this.getDispatchContext()).getWebApp());
    }
960970
public static function getSession()
    {
        if (is_null(self::$session)) {
            if (PHPSession::singleton()->hasAttribute(self::PHPSESSION_SESSION_KEY)) {
                $session = PHPSession::singleton()->getAttribute(self::PHPSESSION_SESSION_KEY);
                if (! $session instanceof common_session_Session) {
                    throw new common_exception_Error('Non session stored in php-session');
                }
                self::$session = $session;
            } else {
                self::$session = new common_session_AnonymousSession();
            }
        }
        if (self::$session instanceof ServiceLocatorAwareInterface) {
            self::$session->setServiceLocator(ServiceManager::getServiceManager());
        }
        return self::$session;
    }
580158
@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 == ClientAccSession.class) {
        IClientAccSessionData data = (IClientAccSessionData) this.sessionDataFactory.getAppSessionData(ClientAccSession.class, sessionId);
        ClientAccSessionImpl clientSession =
            new ClientAccSessionImpl(data, sessionFactory, getClientSessionListener(), getClientContextListener(), getStateListener());

        clientSession.getSessions().get(0).setRequestListener(clientSession);
        appSession = clientSession;
      }
      else if (aClass == ServerAccSession.class) {
        ServerAccSessionImpl serverSession = null;
        IServerAccSessionData data = (IServerAccSessionData) this.sessionDataFactory.getAppSessionData(ServerAccSession.class, sessionId);

        //here we use shorter con, since some data is already present.
        serverSession = new ServerAccSessionImpl(data, sessionFactory,  getServerSessionListener(), getServerContextListener(), getStateListener());
        serverSession.getSessions().get(0).setRequestListener(serverSession);
        appSession = serverSession;
      }
      else {
        throw new IllegalArgumentException("Wrong session class: " + aClass + ". Supported[" + ClientAccSession.class + "," + ServerAccSession.class + "]");
      }
    }
    catch (Exception e) {
      logger.error("Failure to obtain new Accounting Session.", e);
    }

    return appSession;
  }
1341917
@Override
    public String getSessionId() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getSessionId();
        return null;
    }