当前位置: 首页>>代码示例>>Java>>正文


Java HttpResponseStatus.equals方法代码示例

本文整理汇总了Java中io.netty.handler.codec.http.HttpResponseStatus.equals方法的典型用法代码示例。如果您正苦于以下问题:Java HttpResponseStatus.equals方法的具体用法?Java HttpResponseStatus.equals怎么用?Java HttpResponseStatus.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.netty.handler.codec.http.HttpResponseStatus的用法示例。


在下文中一共展示了HttpResponseStatus.equals方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isMoved

import io.netty.handler.codec.http.HttpResponseStatus; //导入方法依赖的package包/类
/**
 * Tells if HTTP response server has moved its {@code URL}.
 * 
 * @param status instance of {@code HttpResponseStatus}
 * @return {@code true} if {@code URL} is moved; otherwise,
 * {@code false}
 */
public static boolean isMoved(HttpResponseStatus status) {
  if (status.equals(HttpResponseStatus.FOUND) ||
      status.equals(HttpResponseStatus.MOVED_PERMANENTLY) ||
      status.equals(HttpResponseStatus.TEMPORARY_REDIRECT)) {
    return true;
  } else {
    return false;
  }
}
 
开发者ID:didclab,项目名称:onedatashare,代码行数:17,代码来源:HTTPResponseCode.java

示例2: isNotFound

import io.netty.handler.codec.http.HttpResponseStatus; //导入方法依赖的package包/类
/**
 * Tells if HTTP response server is not found.
 * 
 * @param status instance of {@code HttpResponseStatus}
 * @return {@code true} if page is not found; otherwise,
 * {@code false}
 */
public static boolean isNotFound(HttpResponseStatus status) {
  if (status.equals(HttpResponseStatus.NOT_FOUND)) {
    return true;
  } else {
    return false;
  }
}
 
开发者ID:didclab,项目名称:onedatashare,代码行数:15,代码来源:HTTPResponseCode.java

示例3: isInvalid

import io.netty.handler.codec.http.HttpResponseStatus; //导入方法依赖的package包/类
/**
 * Tells if HTTP response server failed to accept the request.
 * 
 * @param status instance of {@code HttpResponseStatus}
 * @return {@code true} if it is bad request; otherwise,
 * {@code false}
 */
public static boolean isInvalid(HttpResponseStatus status) {
  if (status.equals(HttpResponseStatus.BAD_REQUEST) ||
      status.equals(HttpResponseStatus.NOT_IMPLEMENTED)) {
    return true;
  } else {
    return false;
  }
}
 
开发者ID:didclab,项目名称:onedatashare,代码行数:16,代码来源:HTTPResponseCode.java

示例4: isOK

import io.netty.handler.codec.http.HttpResponseStatus; //导入方法依赖的package包/类
/**
 * Tells if HTTP response server successfully accepts the request.
 * 
 * @param status instance of {@code HttpResponseStatus}
 * @return {@code true} if it accepts; otherwise, {@code false}
 */
public static boolean isOK(HttpResponseStatus status) {
  if (status.equals(HttpResponseStatus.OK)) {
    return true;
  } else{
    return false;
  }
}
 
开发者ID:didclab,项目名称:onedatashare,代码行数:14,代码来源:HTTPResponseCode.java

示例5: CheckResult

import io.netty.handler.codec.http.HttpResponseStatus; //导入方法依赖的package包/类
public CheckResult(HttpResponseStatus status) {
    this.isOk = false;
    this.status = status;
    if (status.equals(HttpResponseStatus.UNAUTHORIZED)) {
        exception = new UnauthorizedException();
    }
    else if (status.equals(HttpResponseStatus.FORBIDDEN)) {
        exception = new ForbiddenException();
    }
}
 
开发者ID:zhyzhyzhy,项目名称:Ink,代码行数:11,代码来源:CheckResult.java


注:本文中的io.netty.handler.codec.http.HttpResponseStatus.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。