Returns the <code>Session</code> instance of the iSCSI Target with the given name.

@param targetName The name of the session, which instance you want.
@return The requested <code>Session</code> instance.
484338
private final Session getSession (final String targetName) throws NoSuchSessionException {

        final Session session = sessions.get(targetName);

        if (session != null) {
            return session;
        } else {
            throw new NoSuchSessionException("Session " + targetName + " not found!");
        }
    }
91063
public void setTargetName (String targetName) {
        if (targetName == null) target = null;
        target = targetServer.getTarget(targetName);
    }
1009781
@FFDCIgnore({ SSLPeerUnverifiedException.class, Exception.class })
    private Subject tryToAuthenticate(SSLSession session) throws SASException {
        Subject transportSubject = null;
        try {
            transportSubject = authenticateWithCertificateChain(session);
        } catch (SSLPeerUnverifiedException e) {
            throwExceptionIfClientCertificateAuthenticationIsRequired(e);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "The peer could not be verified, but ignoring because client certificate authentication is not required. The exception is: " + e.getMessage());
            }
        } catch (Exception e) {
            /*
             * All the possible exceptions, including AuthenticationException, CredentialExpiredException
             * and CredentialDestroyedException are caught here, and re-thrown
             */
            throwExceptionIfClientCertificateAuthenticationIsRequired(e);
        }

        return transportSubject;
    }
1147729
public static forwardingsession get(nitro_service service, String name) throws Exception{
		forwardingsession obj = new forwardingsession();
		obj.set_name(name);
		forwardingsession response = (forwardingsession) obj.get_resource(service);
		return response;
	}
1020992
@SuppressWarnings("unchecked")
	public static <T> T get(String name) {
		return (T)getHttpSession().getAttribute(name);
	}
928804
public static Session getSession(final ICommandLine cl) throws Exception {
        JSch jsch = new JSch();
        Session session = null;
        int timeout = DEFAULT_TIMEOUT;
        int port = cl.hasOption("port") ? Integer.parseInt(cl.getOptionValue("port")) : +DEFAULT_PORT;
        String hostname = cl.getOptionValue("hostname");
        String username = cl.getOptionValue("username");
        String password = cl.getOptionValue("password");
        String key = cl.getOptionValue("key");
        if (cl.hasOption("timeout")) {
            try {
                timeout = Integer.parseInt(cl.getOptionValue("timeout"));
            } catch (NumberFormatException e) {
                throw new MetricGatheringException("Invalid numeric value for timeout.", Status.CRITICAL, e);
            }
        }
        session = jsch.getSession(username, hostname, port);
        if (key == null) {
            session.setConfig("StrictHostKeyChecking", "no");
            session.setPassword(password);
        } else {
            jsch.addIdentity(key);
        }
        session.connect(timeout * 1000);
        return session;
    }
297641
public Object getInstance(String name) throws SshException {
		if (supported.containsKey(name)) {
			try {
				return createInstance(name, (Class<?>) supported.get(name));
			} catch (Throwable t) {
				throw new SshException(t.getMessage(),
						SshException.INTERNAL_ERROR);
			}
		}
		throw new SshException(name + " is not supported",
				SshException.UNSUPPORTED_ALGORITHM);
	}
298265
@Override
    public HttpSession getSession(boolean create) {
        String methodName = "getSession";

        // 321485
        if (TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) { //306998.15
            logger.logp(Level.FINE, CLASS_NAME, methodName, "create " + String.valueOf(create) + ", this -> " + this);
        }

        HttpSession session = super.getSession(create);

        if (session != null) {
            _sessionCreated = true;
        }

        if (TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
            logger.logp(Level.FINE, CLASS_NAME, methodName, "_sessionCreated " + _sessionCreated + ", this -> " + this);
        }

        return session;
    }
114620
public OvhReverseDelegation ip_delegation_target_GET(String ip, String target) throws IOException {
		String qPath = "/ip/{ip}/delegation/{target}";
		StringBuilder sb = path(qPath, ip, target);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhReverseDelegation.class);
	}
782426
@SuppressWarnings("unchecked")
    public static <T> T getSessionAttribute(final HttpSession session, final String key) {
        if (session != null) {
            return (T) session.getAttribute(key);
        }
        return null;
    }
568471
public CmsSolrIndex getIndexSolr(String indexName) {

        I_CmsSearchIndex index = getIndex(indexName);
        if (index instanceof CmsSolrIndex) {
            return (CmsSolrIndex)index;
        }
        return null;
    }
303685
@Override
    public BufferByteOutput<T> target(final T target) {
        return (BufferByteOutput<T>) super.target(target);
    }
1245940
public RemoteBaseSession makeRemoteSession(String strSessionClassName) throws RemoteException
    {
        BaseSession session = null;
        try   {
            if (strSessionClassName.indexOf('.') == 0)
                strSessionClassName = Constants.ROOT_PACKAGE + strSessionClassName.substring(1);
            Utility.getLogger().info("Make remote session. Remote class: " + strSessionClassName);
        	session = (BaseSession)ClassServiceUtility.getClassService().makeObjectFromClassName(strSessionClassName);
            session.init(this, null, null);
        } catch (Exception ex)  {
            ex.printStackTrace();
            session = null;
        }
        return session;
    }
1268963
public SessionInfo getLockSessionInfo(Task objSession, String strUserName)
    {
        if (objSession == null)
        {
            Utility.getLogger().warning("null session");
            return new SessionInfo(0, strUserName);     // 
        }
        SessionInfo intSession = (SessionInfo)m_hmLockSessions.get(objSession);
        if (intSession == null)
            m_hmLockSessions.put(objSession, intSession = new SessionInfo(m_iNextLockSession++, strUserName));
        return intSession;
    }
440114
public RemoteBaseSession makeRemoteSession(String strSessionClassName) throws RemoteException
    {
        BaseTransport transport = this.createProxyTransport(MAKE_REMOTE_SESSION);
        transport.addParam(NAME, strSessionClassName);
        String strClassAndID = (String)transport.sendMessageAndGetReply();
        return this.checkForSession(strClassAndID);
    }
770572
<T> T get(final Class<T> targetClass, final String tableName, final Object rowKey) throws UncheckedIOException {
        return get(targetClass, tableName, AnyGet.of(rowKey));
    }
749783
private DbxSessionStore getSessionStore(final HttpServletRequest request) {
        // Select a spot in the session for DbxWebAuth to store the CSRF token.
        HttpSession session = request.getSession(true);
        String sessionKey = "dropbox-auth-csrf-token";
        return new DbxStandardSessionStore(session, sessionKey);
    }