org.eclipse.jetty.util.MultiMap.add()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(152)

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

MultiMap.add介绍

[英]Add value to multi valued entry. If the entry is single valued, it is converted to the first value of a multi valued entry.
[中]为多值条目添加值。如果条目是单值条目,则会将其转换为多值条目的第一个值。

代码示例

代码示例来源:origin: org.eclipse.jetty/jetty-util

if (key != null)
      map.add(key,value);
      map.add(value,"");
map.add(key,value);
map.add(buffer.toString(), "");

代码示例来源:origin: org.eclipse.jetty/jetty-util

if (key != null)
     map.add(key,value);
     map.add(value,"");
map.add(key,value);
if (key != null && key.length() > 0)
  map.add(key,"");

代码示例来源:origin: org.eclipse.jetty/jetty-util

if (key != null)
      map.add(key,value);
      map.add(value,"");
map.add(key,value);
map.add(buffer.toReplacedString(), "");

代码示例来源:origin: org.eclipse.jetty/jetty-util

if (key != null)
      map.add(key,value);
      map.add(value,"");
map.add(key,value);
map.add(buffer.toReplacedString(),"");

代码示例来源:origin: org.eclipse.jetty/jetty-util

if (key != null)
      map.add(key,value);
      map.add(value,"");
map.add(key,value);
map.add(output.toString(charset),"");

代码示例来源:origin: org.eclipse.jetty/jetty-util

part.setHeaders(headers);
part.setContentType(contentType);
_parts.add(name, part);
part.open();

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

public void handle(String className, int version, int access, String signature, String superName, String[] interfaces)
{
  try
  {
    for (int i=0; interfaces != null && i<interfaces.length;i++)
    {
      _inheritanceMap.add (interfaces[i], className);
    }
    //To save memory, we don't record classes that only extend Object, as that can be assumed
    if (!"java.lang.Object".equals(superName))
      _inheritanceMap.add(superName, className);
  }
  catch (Exception e)
  {
    LOG.warn(e);
  }  
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public void handle(String className, int version, int access, String signature, String superName, String[] interfaces)
{
  try
  {
    for (int i=0; interfaces != null && i<interfaces.length;i++)
    {
      _inheritanceMap.add (interfaces[i], className);
    }
    //To save memory, we don't record classes that only extend Object, as that can be assumed
    if (!"java.lang.Object".equals(superName))
      _inheritanceMap.add(superName, className);
  }
  catch (Exception e)
  {
    LOG.warn(e);
  }  
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public void handle(String className, int version, int access, String signature, String superName, String[] interfaces)
{
  try
  {
    for (int i=0; interfaces != null && i<interfaces.length;i++)
    {
      _inheritanceMap.add (interfaces[i], className);
    }
    //To save memory, we don't record classes that only extend Object, as that can be assumed
    if (!"java.lang.Object".equals(superName))
      _inheritanceMap.add(superName, className);
  }
  catch (Exception e)
  {
    LOG.warn(e);
  }  
}

代码示例来源:origin: SwellRT/swellrt

public void testBindsUsernameAndPassword() throws IOException, UnsupportedCallbackException {
 MultiMap<String> args = new MultiMap<String>();
 args.add("address", "seph@example.com");
 args.add("password", "internet");
 CallbackHandler handler = new HttpRequestBasedCallbackHandler(args);
 Callback[] callbacks =
   new Callback[] {new NameCallback("ignored"), new PasswordCallback("ignored", false),};
 handler.handle(callbacks);
 assertEquals("seph@example.com", ((NameCallback) callbacks[0]).getName());
 assertEquals("internet", new String(((PasswordCallback) callbacks[1]).getPassword()));
}

代码示例来源:origin: apache/incubator-wave

public void testBindsUsernameAndPassword() throws IOException, UnsupportedCallbackException {
 MultiMap<String> args = new MultiMap<String>();
 args.add("address", "seph@example.com");
 args.add("password", "internet");
 CallbackHandler handler = new HttpRequestBasedCallbackHandler(args);
 Callback[] callbacks =
   new Callback[] {new NameCallback("ignored"), new PasswordCallback("ignored", false),};
 handler.handle(callbacks);
 assertEquals("seph@example.com", ((NameCallback) callbacks[0]).getName());
 assertEquals("internet", new String(((PasswordCallback) callbacks[1]).getPassword()));
}

代码示例来源:origin: org.keycloak/keycloak-jetty81-adapter

for (String key : j_post.keySet()) {
  for (String val : j_post.getList(key)) {
    map.add(key, val);

代码示例来源:origin: org.keycloak/keycloak-saml-jetty93-adapter

for (String key : j_post.keySet()) {
  for (String val : j_post.getList(key)) {
    map.add(key, val);

代码示例来源:origin: org.keycloak/keycloak-saml-jetty81-adapter

for (String key : j_post.keySet()) {
  for (String val : j_post.getList(key)) {
    map.add(key, val);

代码示例来源:origin: org.keycloak/keycloak-saml-jetty92-adapter

for (String key : j_post.keySet()) {
  for (String val : j_post.getList(key)) {
    map.add(key, val);

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

getParameters().add(mp.getName(), content);

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

getParameters().add(mp.getName(), content);

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

getParameters().add(mp.getName(), content);

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

getParameters().add(mp.getName(), content);

代码示例来源:origin: org.eclipse.jetty/server

getParameters().add(mp.getName(), content);

相关文章