Get the session id for our server from the local session
@return The session id or null
763850
protected function getSessionId() {
    // check if we already have a session with the server
    $session = ObjectFactory::getInstance('session');
    $sids = $session->get(self::SIDS_SESSION_VARNAME);
    if (isset($sids[$this->serverCli])) {
      return $sids[$this->serverCli];
    }
    return null;
  }
558614
protected UUID getLoggedUserId() {
    HttpServletRequest httpServletRequest = getHttpServletRequest();
    String remoteUser = httpServletRequest.getRemoteUser();
    if (remoteUser == null) {
      return null;
    }
    
    return UUID.fromString(remoteUser);
  }
810373
protected Long getPersistedSessionId(String location, String identifier) {
        File sessionIdStore = new File(location + File.separator + identifier+ "-jbpmSessionId.ser");
        if (sessionIdStore.exists()) {
        	Long knownSessionId = null; 
            FileInputStream fis = null;
            ObjectInputStream in = null;
            try {
                fis = new FileInputStream(sessionIdStore);
                in = new ObjectInputStream(fis);
                
            	Object tmp = in.readObject();
            	if (tmp instanceof Integer) {
            		tmp = new Long((Integer) tmp);
            	}
        		knownSessionId = (Long) tmp;
                
                return knownSessionId.longValue();
                
            } catch (Exception e) {
                return 0L;
            } finally {
                if (in != null) {
                    try {
                        in.close();
                    } catch (IOException e) {
                    }
                }
                if (fis != null) {
                    try {
                        fis.close();
                    } catch (IOException e) {
                    }
                }
 
            }
            
        } else {
            return 0L;
        }
    }
908828
@SuppressWarnings("WeakerAccess")
  public String getId() {
    // Constructor ensures that name is not null
    InstanceName fullName =
        Verify.verifyNotNull(InstanceName.parse(proto.getName()), "Name can never be null");

    //noinspection ConstantConditions
    return fullName.getInstance();
  }
248338
public String getActualSSLSessionId(ServletRequest request) {
        String sessionID = null;
        byte[] sslBytes = ((IExtendedRequest) request).getSSLId();
        if (sslBytes != null) {
            sessionID = SessionIDGeneratorImpl.convertSessionIdBytesToSessionId(sslBytes, SessionManagerConfig.getSessionIDLength());
        }
        return sessionID;
    }
1129154
public String clearSession() {

        synchronized (sharedLock) {
            SessionData session = loadSession();
            String id = session != null ? session.getSessionId() : null;
            clearAll();
            sharedLock.notifyAll();
            return id;
        }
    }
873474
@Override
  public BaseSession getSession(String sessionId) {
    if (this.localDataSource.exists(sessionId)) {
      return this.localDataSource.getSession(sessionId);
    }
    else if (!this.localMode && this.existReplicated(sessionId)) {
      this.makeLocal(sessionId);
      return this.localDataSource.getSession(sessionId);
    }

    return null;
  }
89008
private Session getCurrentSession() {
		//no logging allowed, since this is called by logging process itself
		//this won't work in a remote component
		synchronized (requestsByThreadId) {
			StandardRequest request = (StandardRequest) requestsByThreadId.get(Thread.currentThread().hashCode());
			if (request != null) {
				return request.getSession(false);
			}
		}
		return null;
	}
205609
protected final String getAccessToken() {
        if (sessionTracker != null) {
            Session currentSession = sessionTracker.getOpenSession();
            return (currentSession != null) ? currentSession.getAccessToken() : null;
        }
        return null;
    }
101281
public InstanceId getInstanceId()
    {
        if (m_instanceId == null)
        {
            try
            {
                byte[] data =
                    m_zk.getData(CoreZK.instance_id, false, null);
                JSONObject idJSON = new JSONObject(new String(data, "UTF-8"));
                m_instanceId = new InstanceId(idJSON.getInt("coord"),
                        idJSON.getLong("timestamp"));

            }
            catch (Exception e)
            {
                String msg = "Unable to get instance ID info from " + CoreZK.instance_id;
                hostLog.error(msg);
                throw new RuntimeException(msg, e);
            }
        }
        return m_instanceId;
    }
513837
def session_id(self):
        
        return None if not self.session or 'JSESSIONID' not in \
            self.session.cookies else 'JSESSIONID={}'.format(
                self.session.cookies['JSESSIONID'])
124608
public Session getOpenSession() {
        Session openSession = getSession();
        if (openSession != null && openSession.isOpened()) {
            return openSession;
        }
        return null;
    }
994820
public String getSessionid(boolean create) {
        String sessionid = getCookie(SESSIONID_NAME, null);
        if (create && (sessionid == null || sessionid.isEmpty())) {
            sessionid = context.createSessionid();
            this.newsessionid = sessionid;
        }
        return sessionid;
    }
274170
public function getSessionId()
    {
        return isset($this->data->sid)
            ? (string) $this->data->sid
            : null;
    }
1216123
public function get_user_id()
    {
        if (is_object($this->user)) {
            return $this->user->ID;
        }
        else if (isset($_SESSION['user_id'])) {
            return $_SESSION['user_id'];
        }

        return null;
    }
1309539
public java.lang.String getSessionHandle() {
    java.lang.Object ref = sessionHandle_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      sessionHandle_ = s;
      return s;
    }
  }
1187968
public String getID() {
        byte[] genBytes = new byte[_byteArraySize];
        synchronized(_random) {
            _random.nextBytes(genBytes);
        }
        String id = convertSessionIdBytesToSessionId(genBytes, _sessionIDLength);
        if (logger.isLoggable(Level.FINE)) {
            logger.logp(Level.FINE, methodClassName, "getSessionID", "sessionID=" + id);
        }
        return id;
    }