类io.netty.channel.unix.Errors.NativeIoException源码实例Demo

下面列出了怎么用io.netty.channel.unix.Errors.NativeIoException的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: syncope   文件: SyncopeSRAWebExceptionHandler.java
@Override
public Mono<Void> handle(final ServerWebExchange exchange, final Throwable throwable) {
    if (throwable instanceof ConnectException
            || throwable instanceof NativeIoException
            || throwable instanceof NotFoundException) {

        LOG.error("ConnectException thrown", throwable);

        return doHandle(exchange, throwable, HttpStatus.NOT_FOUND);
    } else if (throwable instanceof OAuth2AuthorizationException) {
        LOG.error("OAuth2AuthorizationException thrown", throwable);

        return doHandle(exchange, throwable, HttpStatus.INTERNAL_SERVER_ERROR);
    }

    return Mono.error(throwable);
}
 
源代码2 项目: netty-4.1.22   文件: KQueueSocketRstTest.java
@Override
protected void assertRstOnCloseException(IOException cause, Channel clientChannel) {
    if (!AbstractKQueueChannel.class.isInstance(clientChannel)) {
        super.assertRstOnCloseException(cause, clientChannel);
        return;
    }

    assertTrue("actual [type, message]: [" + cause.getClass() + ", " + cause.getMessage() + "]",
               cause instanceof NativeIoException);
    assertEquals(Errors.ERRNO_ECONNRESET_NEGATIVE, ((NativeIoException) cause).expectedErr());
}
 
源代码3 项目: netty-4.1.22   文件: EpollSocketRstTest.java
@Override
protected void assertRstOnCloseException(IOException cause, Channel clientChannel) {
    if (!AbstractEpollChannel.class.isInstance(clientChannel)) {
        super.assertRstOnCloseException(cause, clientChannel);
        return;
    }

    assertTrue("actual [type, message]: [" + cause.getClass() + ", " + cause.getMessage() + "]",
               cause instanceof NativeIoException);
    assertEquals(Errors.ERRNO_ECONNRESET_NEGATIVE, ((NativeIoException) cause).expectedErr());
}
 
源代码4 项目: pulsar   文件: ClientCnx.java
public static boolean isKnownException(Throwable t) {
    return t instanceof NativeIoException || t instanceof ClosedChannelException;
}
 
 类所在包
 同包方法