Package io.netty.channel.unix
Class Errors
java.lang.Object
io.netty.channel.unix.Errors
Internal usage only!
Static members which call JNI methods must be defined in ErrorsStaticallyReferencedJniMethods
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
static final class
Internal usage only! -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
private static final String[]
Holds the mappings for errno codes to String messages. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
errnoString
(int err) static boolean
handleConnectErrno
(String method, int err) static int
static int
ioResult
(String method, int err, Errors.NativeIoException resetCause, ClosedChannelException closedCause) Deprecated.private static IOException
newConnectException0
(String method, int err) static Errors.NativeIoException
newConnectionResetException
(String method, int errnoNegative) static Errors.NativeIoException
newIOException
(String method, int err) static void
throwConnectException
(String method, int err) Deprecated.
-
Field Details
-
ERRNO_ENOENT_NEGATIVE
public static final int ERRNO_ENOENT_NEGATIVE -
ERRNO_ENOTCONN_NEGATIVE
public static final int ERRNO_ENOTCONN_NEGATIVE -
ERRNO_EBADF_NEGATIVE
public static final int ERRNO_EBADF_NEGATIVE -
ERRNO_EPIPE_NEGATIVE
public static final int ERRNO_EPIPE_NEGATIVE -
ERRNO_ECONNRESET_NEGATIVE
public static final int ERRNO_ECONNRESET_NEGATIVE -
ERRNO_EAGAIN_NEGATIVE
public static final int ERRNO_EAGAIN_NEGATIVE -
ERRNO_EWOULDBLOCK_NEGATIVE
public static final int ERRNO_EWOULDBLOCK_NEGATIVE -
ERRNO_EINPROGRESS_NEGATIVE
public static final int ERRNO_EINPROGRESS_NEGATIVE -
ERROR_ECONNREFUSED_NEGATIVE
public static final int ERROR_ECONNREFUSED_NEGATIVE -
ERROR_EISCONN_NEGATIVE
public static final int ERROR_EISCONN_NEGATIVE -
ERROR_EALREADY_NEGATIVE
public static final int ERROR_EALREADY_NEGATIVE -
ERROR_ENETUNREACH_NEGATIVE
public static final int ERROR_ENETUNREACH_NEGATIVE -
ERROR_EHOSTUNREACH_NEGATIVE
public static final int ERROR_EHOSTUNREACH_NEGATIVE -
ERRORS
Holds the mappings for errno codes to String messages. This eliminates the need to call back into JNI to get the right String message on an exception and thus is faster. Choose an array length which should give us enough space in the future even when more errno codes will be added.
-
-
Constructor Details
-
Errors
private Errors()
-
-
Method Details
-
handleConnectErrno
- Throws:
IOException
-
throwConnectException
Deprecated.- Parameters:
method
- The native method name which caused the errno.err
- the negative value of the errno.- Throws:
IOException
- The errno translated into an exception.
-
errnoString
-
newConnectException0
-
newConnectionResetException
public static Errors.NativeIoException newConnectionResetException(String method, int errnoNegative) -
newIOException
-
ioResult
@Deprecated public static int ioResult(String method, int err, Errors.NativeIoException resetCause, ClosedChannelException closedCause) throws IOException Deprecated.- Throws:
IOException
-
ioResult
- Throws:
IOException
-
handleConnectErrno(String, int)
.