com.hp.oo.sdk.content.plugin.GlobalSessionObject.getResource()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(66)

本文整理了Java中com.hp.oo.sdk.content.plugin.GlobalSessionObject.getResource()方法的一些代码示例,展示了GlobalSessionObject.getResource()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GlobalSessionObject.getResource()方法的具体详情如下:
包路径:com.hp.oo.sdk.content.plugin.GlobalSessionObject
类名称:GlobalSessionObject
方法名:getResource

GlobalSessionObject.getResource介绍

暂无

代码示例

代码示例来源:origin: io.cloudslang.content/score-ssh

/**
 * Remove the SSH session (and associated channel if any) from the cache.
 *
 * @param sessionParam The cache.
 * @param sessionId    The key to the session in the cache map.
 */
public static void removeSshSession(GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
  if (sessionParam != null) {
    SessionResource<Map<String, SSHConnection>> resource = sessionParam.getResource();
    if (resource != null) {
      Map<String, SSHConnection> tempMap = resource.get();
      if (tempMap != null) {
        tempMap.remove(sessionId);
      }
    }
  }
}

代码示例来源:origin: io.openscore.content/score-ssh

/**
 * Remove the SSH session (and associated channel if any) from the cache.
 *
 * @param sessionParam The cache.
 * @param sessionId    The key to the session in the cache map.
 */
public static void removeSshSession(GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
  if (sessionParam != null) {
    SessionResource<Map<String, SSHConnection>> resource = sessionParam.getResource();
    if (resource != null) {
      Map<String, SSHConnection> tempMap = resource.get();
      if (tempMap != null) {
        tempMap.remove(sessionId);
      }
    }
  }
}

代码示例来源:origin: io.cloudslang.content/cs-ssh

/**
 * Remove the SSH session (and associated channel if any) from the cache.
 *
 * @param sessionParam The cache.
 * @param sessionId    The key to the session in the cache map.
 */
public static void removeSshSession(GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
  if (sessionParam != null) {
    SessionResource<Map<String, SSHConnection>> resource = sessionParam.getResource();
    if (resource != null) {
      Map<String, SSHConnection> tempMap = resource.get();
      if (tempMap != null) {
        tempMap.remove(sessionId);
      }
    }
  }
}

代码示例来源:origin: CloudSlang/cs-actions

/**
 * Remove the SSH session (and associated channel if any) from the cache.
 *
 * @param sessionParam The cache.
 * @param sessionId    The key to the session in the cache map.
 */
public static void removeSshSession(GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
  if (sessionParam != null) {
    SessionResource<Map<String, SSHConnection>> resource = sessionParam.getResource();
    if (resource != null) {
      Map<String, SSHConnection> tempMap = resource.get();
      if (tempMap != null) {
        tempMap.remove(sessionId);
      }
    }
  }
}

代码示例来源:origin: io.cloudslang.content/score-ssh

protected SSHService getFromCache(SSHShellInputs sshShellInputs, String sessionId) {
  if (sessionId != null) {
    synchronized (sessionId) {
      return CacheUtils.getFromCache(sshShellInputs.getSshGlobalSessionObject().getResource(), sessionId);
    }
  } else {
    return null;
  }
}

代码示例来源:origin: io.openscore.content/score-ssh

protected SSHService getFromCache(SSHShellInputs sshShellInputs, String sessionId) {
  if (sessionId != null) {
    synchronized (sessionId) {
      return CacheUtils.getFromCache(sshShellInputs.getSshGlobalSessionObject().getResource(), sessionId);
    }
  } else {
    return null;
  }
}

代码示例来源:origin: io.cloudslang.content/cs-ssh

protected SSHService getFromCache(SSHShellInputs sshShellInputs, String sessionId) {
  if (sessionId != null) {
    synchronized (sessionId) {
      return CacheUtils.getFromCache(sshShellInputs.getSshGlobalSessionObject().getResource(), sessionId);
    }
  } else {
    return null;
  }
}

代码示例来源:origin: CloudSlang/cs-actions

protected SSHService getFromCache(SSHShellInputs sshShellInputs, String sessionId) {
  if (sessionId != null) {
    synchronized (sessionId) {
      return CacheUtils.getFromCache(sshShellInputs.getSshGlobalSessionObject().getResource(), sessionId);
    }
  } else {
    return null;
  }
}

相关文章