本文整理了Java中org.restlet.data.Status.isClientError()
方法的一些代码示例,展示了Status.isClientError()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Status.isClientError()
方法的具体详情如下:
包路径:org.restlet.data.Status
类名称:Status
方法名:isClientError
[英]Indicates if the status is a client error status, meaning "The request contains bad syntax or cannot be fulfilled".
[中]指示状态是否为客户端错误状态,表示“请求包含错误语法或无法实现”。
代码示例来源:origin: org.sonatype.nexus/nexus-test-utils
@Override
protected boolean matchesSafely( Status item )
{
return item.isClientError();
}
代码示例来源:origin: org.sonatype.nexus/nexus-test-harness-launcher
@Override
protected boolean matchesSafely(Status item) {
return item.isClientError();
}
代码示例来源:origin: ontopia/ontopia
public boolean isClientError() {
return status.isClientError();
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Indicates if the status is a client error status, meaning "The request
* contains bad syntax or cannot be fulfilled".
*
* @return True if the status is a client error status.
*/
public boolean isClientError() {
return isClientError(getCode());
}
代码示例来源:origin: org.restlet/org.restlet
/**
* Indicates if the status is a client error status, meaning "The request
* contains bad syntax or cannot be fulfilled".
*
* @return True if the status is a client error status.
*/
public boolean isClientError() {
return isClientError(getCode());
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Indicates if the status is a client error status, meaning "The request
* contains bad syntax or cannot be fulfilled".
*
* @return True if the status is a client error status.
*/
public boolean isClientError() {
return isClientError(getCode());
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Indicates if the status is an error (client or server) status.
*
* @param code
* The code of the status.
* @return True if the status is an error (client or server) status.
*/
public static boolean isError(int code) {
return isClientError(code) || isServerError(code)
|| isConnectorError(code);
}
代码示例来源:origin: org.restlet/org.restlet
/**
* Indicates if the status is an error (client or server) status.
*
* @param code
* The code of the status.
* @return True if the status is an error (client or server) status.
*/
public static boolean isError(int code) {
return isClientError(code) || isServerError(code)
|| isConnectorError(code);
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Indicates if the status is an error (client or server) status.
*
* @param code
* The code of the status.
* @return True if the status is an error (client or server) status.
*/
public static boolean isError(int code) {
return isClientError(code) || isServerError(code)
|| isConnectorError(code) || isGlobalError(code);
}
代码示例来源:origin: org.restlet.jee/org.restlet.ext.wadl
/**
* Indicates if the application and all its resources can be described using
* WADL.
*
* @param remainingPart
* The URI remaining part.
* @param request
* The request to handle.
* @param response
* The response to update.
*/
protected boolean canDescribe(String remainingPart, Request request,
Response response) {
return isAutoDescribing()
&& Method.OPTIONS.equals(request.getMethod())
&& (response.getStatus().isClientError() || !response
.isEntityAvailable())
&& ("/".equals(remainingPart) || "".equals(remainingPart));
}
代码示例来源:origin: org.restlet.osgi/org.restlet
} else if (status.isConnectorError()) {
level = Level.INFO;
} else if (status.isClientError()) {
level = Level.FINE;
代码示例来源:origin: org.restlet.osgi/org.restlet.ext.platform
if (e.getStatus().isConnectorError()) {
throw new RuntimeException("Restlet Cloud communication error. Please check the root cause below.", e);
} else if (e.getStatus().isClientError()) {
if (e.getStatus().getCode() == 403) {
throw new RuntimeException("Restlet Cloud Authentication fails. Check that you provide valid credentials.", e);
代码示例来源:origin: org.restlet.gae/org.restlet.ext.platform
if (e.getStatus().isConnectorError()) {
throw new RuntimeException("Restlet Cloud communication error. Please check the root cause below.", e);
} else if (e.getStatus().isClientError()) {
if (e.getStatus().getCode() == 403) {
throw new RuntimeException("Restlet Cloud Authentication fails. Check that you provide valid credentials.", e);
代码示例来源:origin: org.restlet.jee/org.restlet.ext.apispark
if (e.getStatus().isConnectorError()) {
throw new RuntimeException("APISpark communication error. Please check the root cause below.", e);
} else if (e.getStatus().isClientError()) {
if (e.getStatus().getCode() == 403) {
throw new RuntimeException("APISpark Authentication fails. Check that you provide valid credentials.", e);
代码示例来源:origin: org.restlet.jee/org.restlet.ext.platform
if (e.getStatus().isConnectorError()) {
throw new RuntimeException("Restlet Cloud communication error. Please check the root cause below.", e);
} else if (e.getStatus().isClientError()) {
if (e.getStatus().getCode() == 403) {
throw new RuntimeException("Restlet Cloud Authentication fails. Check that you provide valid credentials.", e);
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Invoked when an error or an exception is caught during initialization,
* handling or releasing. By default, updates the responses's status with
* the result of {@link org.restlet.service.StatusService#toStatus(Throwable, Resource)}.
*
* @param throwable
* The caught error or exception.
*/
protected void doCatch(Throwable throwable) {
Level level = Level.INFO;
Status status = getStatusService().toStatus(throwable, this);
if (status.isServerError()) {
level = Level.SEVERE;
} else if (status.isConnectorError()) {
level = Level.INFO;
} else if (status.isClientError()) {
level = Level.FINE;
}
getLogger().log(level, "Exception or error caught in server resource",
throwable);
if (getResponse() != null) {
getResponse().setStatus(status);
Representation errorEntity = getStatusService().toRepresentation(
status, this);
getResponse().setEntity(errorEntity);
}
}
代码示例来源:origin: org.restlet.jse/org.restlet.ext.platform
if (e.getStatus().isConnectorError()) {
throw new RuntimeException("Restlet Cloud communication error. Please check the root cause below.", e);
} else if (e.getStatus().isClientError()) {
if (e.getStatus().getCode() == 403) {
throw new RuntimeException("Restlet Cloud Authentication fails. Check that you provide valid credentials.", e);
内容来源于网络,如有侵权,请联系作者删除!