org.glassfish.grizzly.http.server.Request.removeAttribute()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(9.2k)|赞(0)|评价(0)|浏览(169)

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

Request.removeAttribute介绍

[英]Remove the specified request attribute if it exists.
[中]删除指定的请求属性(如果存在)。

代码示例

代码示例来源:origin: jersey/jersey

@Override
  public void removeProperty(String name) {
    request.removeAttribute(name);
  }
}

代码示例来源:origin: org.glassfish.jersey.containers/jersey-container-grizzly2-http

@Override
  public void removeProperty(String name) {
    request.removeAttribute(name);
  }
}

代码示例来源:origin: javaee/grizzly

/**
 * Set the specified request attribute to the specified value.
 *
 * @param name Name of the request attribute to set
 * @param value The associated value
 */
public void setAttribute(final String name, final Object value) {
  // Name cannot be null
  if (name == null)
    throw new IllegalArgumentException("Argument 'name' cannot be null");
  // Null value is the same as removeAttribute()
  if (value == null) {
    removeAttribute(name);
    return;
  }
  if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
    dispatcherType = value;
    return;
  } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
    requestDispatcherPath = value;
    return;
  }
  request.setAttribute(name, value);
  assert response != null;
  if (response.isSendFileEnabled() && SEND_FILE_ATTR.equals(name)) {
    RequestUtils.handleSendFile(this);
  }
}

代码示例来源:origin: javaee/grizzly

/**
 * Set the specified request attribute to the specified value.
 *
 * @param name Name of the request attribute to set
 * @param value The associated value
 */
public void setAttribute(final String name, final Object value) {
  // Name cannot be null
  if (name == null)
    throw new IllegalArgumentException("Argument 'name' cannot be null");
  // Null value is the same as removeAttribute()
  if (value == null) {
    removeAttribute(name);
    return;
  }
  if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
    dispatcherType = value;
    return;
  } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
    requestDispatcherPath = value;
    return;
  }
  request.setAttribute(name, value);
  assert response != null;
  if (response.isSendFileEnabled() && SEND_FILE_ATTR.equals(name)) {
    RequestUtils.handleSendFile(this);
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server

/**
 * Set the specified request attribute to the specified value.
 *
 * @param name Name of the request attribute to set
 * @param value The associated value
 */
public void setAttribute(final String name, final Object value) {
  // Name cannot be null
  if (name == null)
    throw new IllegalArgumentException("Argument 'name' cannot be null");
  // Null value is the same as removeAttribute()
  if (value == null) {
    removeAttribute(name);
    return;
  }
  if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
    dispatcherType = value;
    return;
  } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
    requestDispatcherPath = value;
    return;
  }
  request.setAttribute(name, value);
  assert response != null;
  if (response.isSendFileEnabled() && SEND_FILE_ATTR.equals(name)) {
    RequestUtils.handleSendFile(this);
  }
}

代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server

/**
 * Set the specified request attribute to the specified value.
 *
 * @param name Name of the request attribute to set
 * @param value The associated value
 */
public void setAttribute(final String name, final Object value) {
  // Name cannot be null
  if (name == null)
    throw new IllegalArgumentException("Argument 'name' cannot be null");
  // Null value is the same as removeAttribute()
  if (value == null) {
    removeAttribute(name);
    return;
  }
  if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
    dispatcherType = value;
    return;
  } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
    requestDispatcherPath = value;
    return;
  }
  request.setAttribute(name, value);
  if (response.isSendFileEnabled() && SEND_FILE_ATTR.equals(name)) {
    RequestUtils.handleSendFile(this);
  }
}

代码示例来源:origin: javaee/grizzly

/**
 * Set the specified request attribute to the specified value.
 *
 * @param name Name of the request attribute to set
 * @param value The associated value
 */
public void setAttribute(final String name, final Object value) {
  // Name cannot be null
  if (name == null)
    throw new IllegalArgumentException("Argument 'name' cannot be null");
  // Null value is the same as removeAttribute()
  if (value == null) {
    removeAttribute(name);
    return;
  }
  if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
    dispatcherType = value;
    return;
  } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
    requestDispatcherPath = value;
    return;
  }
  request.setAttribute(name, value);
  assert response != null;
  if (response.isSendFileEnabled() && SEND_FILE_ATTR.equals(name)) {
    RequestUtils.handleSendFile(this);
  }
}

代码示例来源:origin: javaee/grizzly

/**
 * Set the specified request attribute to the specified value.
 *
 * @param name Name of the request attribute to set
 * @param value The associated value
 */
public void setAttribute(final String name, final Object value) {
  // Name cannot be null
  if (name == null)
    throw new IllegalArgumentException("Argument 'name' cannot be null");
  // Null value is the same as removeAttribute()
  if (value == null) {
    removeAttribute(name);
    return;
  }
  if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
    dispatcherType = value;
    return;
  } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
    requestDispatcherPath = value;
    return;
  }
  request.setAttribute(name, value);
  assert response != null;
  if (response.isSendFileEnabled() && SEND_FILE_ATTR.equals(name)) {
    RequestUtils.handleSendFile(this);
  }
}

代码示例来源:origin: javaee/grizzly

/**
 * Set the specified request attribute to the specified value.
 *
 * @param name Name of the request attribute to set
 * @param value The associated value
 */
public void setAttribute(final String name, final Object value) {
  // Name cannot be null
  if (name == null)
    throw new IllegalArgumentException("Argument 'name' cannot be null");
  // Null value is the same as removeAttribute()
  if (value == null) {
    removeAttribute(name);
    return;
  }
  if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
    dispatcherType = value;
    return;
  } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
    requestDispatcherPath = value;
    return;
  }
  request.setAttribute(name, value);
  assert response != null;
  if (response.isSendFileEnabled() && SEND_FILE_ATTR.equals(name)) {
    RequestUtils.handleSendFile(this);
  }
}

代码示例来源:origin: javaee/grizzly

/**
 * Set the specified request attribute to the specified value.
 *
 * @param name Name of the request attribute to set
 * @param value The associated value
 */
public void setAttribute(final String name, final Object value) {
  // Name cannot be null
  if (name == null)
    throw new IllegalArgumentException("Argument 'name' cannot be null");
  // Null value is the same as removeAttribute()
  if (value == null) {
    removeAttribute(name);
    return;
  }
  if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
    dispatcherType = value;
    return;
  } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
    requestDispatcherPath = value;
    return;
  }
  request.setAttribute(name, value);
  assert response != null;
  if (response.isSendFileEnabled() && SEND_FILE_ATTR.equals(name)) {
    RequestUtils.handleSendFile(this);
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core

/**
 * Set the specified request attribute to the specified value.
 *
 * @param name Name of the request attribute to set
 * @param value The associated value
 */
public void setAttribute(final String name, final Object value) {
  // Name cannot be null
  if (name == null)
    throw new IllegalArgumentException("Argument 'name' cannot be null");
  // Null value is the same as removeAttribute()
  if (value == null) {
    removeAttribute(name);
    return;
  }
  if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
    dispatcherType = value;
    return;
  } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
    requestDispatcherPath = value;
    return;
  }
  request.setAttribute(name, value);
  assert response != null;
  if (response.isSendFileEnabled() && SEND_FILE_ATTR.equals(name)) {
    RequestUtils.handleSendFile(this);
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * Set the specified request attribute to the specified value.
 *
 * @param name Name of the request attribute to set
 * @param value The associated value
 */
public void setAttribute(final String name, final Object value) {
  // Name cannot be null
  if (name == null)
    throw new IllegalArgumentException("Argument 'name' cannot be null");
  // Null value is the same as removeAttribute()
  if (value == null) {
    removeAttribute(name);
    return;
  }
  if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
    dispatcherType = value;
    return;
  } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
    requestDispatcherPath = value;
    return;
  }
  request.setAttribute(name, value);
  assert response != null;
  if (response.isSendFileEnabled() && SEND_FILE_ATTR.equals(name)) {
    RequestUtils.handleSendFile(this);
  }
}

代码示例来源:origin: javaee/grizzly

/**
 * Set the specified request attribute to the specified value.
 *
 * @param name Name of the request attribute to set
 * @param value The associated value
 */
public void setAttribute(final String name, final Object value) {
  // Name cannot be null
  if (name == null)
    throw new IllegalArgumentException("Argument 'name' cannot be null");
  // Null value is the same as removeAttribute()
  if (value == null) {
    removeAttribute(name);
    return;
  }
  if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
    dispatcherType = value;
    return;
  } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
    requestDispatcherPath = value;
    return;
  }
  request.setAttribute(name, value);
  assert response != null;
  if (response.isSendFileEnabled() && SEND_FILE_ATTR.equals(name)) {
    RequestUtils.handleSendFile(this);
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

request.removeAttribute(name);

代码示例来源:origin: javaee/grizzly

request.removeAttribute(name);

代码示例来源:origin: javaee/grizzly

request.removeAttribute(name);

代码示例来源:origin: javaee/grizzly

request.removeAttribute(name);

代码示例来源:origin: javaee/grizzly

request.removeAttribute(name);

代码示例来源:origin: javaee/grizzly

request.removeAttribute(name);

相关文章

Request类方法