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

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

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

GlobalSessionObject.get介绍

暂无

代码示例

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

public String getNext(GlobalSessionObject<Map<String, Object>> session) {
  if (index < splitList.length) {
    String ret = splitList[index];
    index += 1;
    session.get().put(TEXT_INDEX, index);
    return ret;
  } else {
    this.index += 1;
    session.get().put(TEXT_INDEX, index);
    return null;
  }
}

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

private boolean initialized(GlobalSessionObject<Map<String, Object>> session) {
  return (session.get().get(TEXT_ARRAYLIST) != null &&
      session.get().get(TEXT_INDEX) != null);
}

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

public void setStepSessionEnd(GlobalSessionObject<Map<String, Object>> session) {
  session.get().put(TEXT_INDEX, Integer.toString(0));
}

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

@NotNull
public static List<String> getRowsFromGlobalSessionMap(@NotNull final GlobalSessionObject<Map<String, Object>> globalSessionObject, @NotNull final String aKey) {
  final Map<String, Object> globalMap = globalSessionObject.get();
  if (globalMap.containsKey(aKey)) {
    try {
      return (List<String>) globalMap.get(aKey);
    } catch (Exception e) {
      globalMap.remove(aKey);
      globalSessionObject.setResource(new SQLSessionResource(globalMap));
    }
  }
  return new ArrayList<>();
}

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

@NotNull
public static String getStrColumns(@NotNull final GlobalSessionObject<Map<String, Object>> globalSessionObject, @NotNull final String strKeyCol) {
  final Map<String, Object> globalMap = globalSessionObject.get();
  if (globalMap.containsKey(strKeyCol) && globalMap.get(strKeyCol) instanceof String) {
    try {
      return (String) globalMap.get(strKeyCol);
    } catch (Exception e) {
      globalMap.remove(strKeyCol);
      globalSessionObject.setResource(new SQLSessionResource(globalMap));
    }
  }
  return EMPTY;
}

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

@NotNull
public static GlobalSessionObject<Map<String, Object>> getOrDefaultGlobalSessionObj(@NotNull final GlobalSessionObject<Map<String, Object>> globalSessionObject) {
  if (globalSessionObject.get() != null) {
    return globalSessionObject;
  }
  globalSessionObject.setResource(new SQLSessionResource(new HashMap<String, Object>()));
  return globalSessionObject;
}

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

synchronized (connectionPoolHolder) {
  Map<String, PoolingHttpClientConnectionManager> connectionManagerMap
      = connectionPoolHolder.get();
    connectionManagerMap = connectionPoolHolder.get();

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

synchronized (connectionPoolHolder) {
  Map<String, PoolingHttpClientConnectionManager> connectionManagerMap
      = connectionPoolHolder.get();
    connectionManagerMap = connectionPoolHolder.get();

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

synchronized(connectionPoolHolder) {
  Map<String, PoolingHttpClientConnectionManager> connectionManagerMap
      = connectionPoolHolder.get();
    connectionManagerMap = connectionPoolHolder.get();

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

synchronized (connectionPoolHolder) {
  Map<String, PoolingHttpClientConnectionManager> connectionManagerMap
      = connectionPoolHolder.get();
    connectionManagerMap = connectionPoolHolder.get();

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

/**
 * Save the SSH session and the channel in the cache.
 *
 * @param session      The SSH session.
 * @param channel      The SSH channel.
 * @param sessionParam The cache: GlobalSessionObject or SessionObject.
 */
public static boolean saveSshSessionAndChannel(Session session, Channel channel, GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
  final SSHConnection sshConnection;
  if (channel != null) {
    sshConnection = new SSHConnection(session, channel);
  } else {
    sshConnection = new SSHConnection(session);
  }
  if (sessionParam != null) {
    Map<String, SSHConnection> tempMap = sessionParam.get();
    if (tempMap == null) {
      tempMap = new HashMap<>();
    }
    tempMap.put(sessionId, sshConnection);
    sessionParam.setResource(new SSHSessionResource(tempMap));
    return true;
  }
  return false;
}

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

/**
 * Save the SSH session and the channel in the cache.
 *
 * @param session      The SSH session.
 * @param channel      The SSH channel.
 * @param sessionParam The cache: GlobalSessionObject or SessionObject.
 */
public static boolean saveSshSessionAndChannel(Session session, Channel channel, GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
  final SSHConnection sshConnection;
  if (channel != null) {
    sshConnection = new SSHConnection(session, channel);
  } else {
    sshConnection = new SSHConnection(session);
  }
  if (sessionParam != null) {
    Map<String, SSHConnection> tempMap = sessionParam.get();
    if (tempMap == null) {
      tempMap = new HashMap<>();
    }
    tempMap.put(sessionId, sshConnection);
    sessionParam.setResource(new SSHSessionResource(tempMap));
    return true;
  }
  return false;
}

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

/**
 * Save the SSH session and the channel in the cache.
 *
 * @param session      The SSH session.
 * @param channel      The SSH channel.
 * @param sessionParam The cache: GlobalSessionObject or SessionObject.
 */
public static boolean saveSshSessionAndChannel(Session session, Channel channel, GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
  final SSHConnection sshConnection;
  if (channel != null) {
    sshConnection = new SSHConnection(session, channel);
  } else {
    sshConnection = new SSHConnection(session);
  }
  if (sessionParam != null) {
    Map<String, SSHConnection> tempMap = sessionParam.get();
    if (tempMap == null) {
      tempMap = new HashMap<>();
    }
    tempMap.put(sessionId, sshConnection);
    sessionParam.setResource(new SSHSessionResource(tempMap));
    return true;
  }
  return false;
}

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

/**
 * Save the SSH session and the channel in the cache.
 *
 * @param session      The SSH session.
 * @param channel      The SSH channel.
 * @param sessionParam The cache: GlobalSessionObject or SessionObject.
 */
public static boolean saveSshSessionAndChannel(Session session, Channel channel, GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
  final SSHConnection sshConnection;
  if (channel != null) {
    sshConnection = new SSHConnection(session, channel);
  } else {
    sshConnection = new SSHConnection(session);
  }
  if (sessionParam != null) {
    Map<String, SSHConnection> tempMap = sessionParam.get();
    if (tempMap == null) {
      tempMap = new HashMap<>();
    }
    tempMap.put(sessionId, sshConnection);
    sessionParam.setResource(new SSHSessionResource(tempMap));
    return true;
  }
  return false;
}

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

public void init(String list, String delim, GlobalSessionObject<Map<String, Object>> session) throws IteratorProcessorException {
  if (session.get() == null) {
    session.setResource(new IteratorSessionResource(new HashMap<String, Object>()));
  Map<String, Object> sessionMap = session.get();
  if (list != null && delim != null) {
    if (delim.length() == 0) {

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

final Map<String, Object> sqlConnectionMap = globalSessionObject.get();

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

globalSessionObject = getOrDefaultGlobalSessionObj(globalSessionObject);
final Map<String, Object> globalMap = globalSessionObject.get();

相关文章