Top Description Inners Fields Constructors Methods
io.netty.channel.unix

public final Class Errors

extends Object
Class Inheritance
Imports
io.netty.util.internal.EmptyArrays, java.io.FileNotFoundException, .IOException, java.net.ConnectException, .NoRouteToHostException, java.nio.channels.AlreadyConnectedException, .ClosedChannelException, .ConnectionPendingException, .NotYetConnectedException

Internal usage only!

Static members which call JNI methods must be defined in ErrorsStaticallyReferencedJniMethods.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
public static class
Errors.NativeIoException

Internal usage only!

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
private static final String[]
ERRORS

Holds the mappings for errno codes to String messages.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static String
errnoString(int err)

public static boolean
handleConnectErrno(String method, int err)

public static int
ioResult(String method, int err, Errors.NativeIoException resetCause, ClosedChannelException closedCause)

Deprecated
public static int
ioResult(String method, int err)

private static IOException
newConnectException0(String method, int err)

public static Errors.NativeIoException
newConnectionResetException(String method, int errnoNegative)

public static Errors.NativeIoException
newIOException(String method, int err)

public static void
throwConnectException(String
The native method name which caused the errno.
method
,
int
the negative value of the errno.
err
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ERRNO_EAGAIN_NEGATIVEback to summary
public static final int ERRNO_EAGAIN_NEGATIVE
ERRNO_EBADF_NEGATIVEback to summary
public static final int ERRNO_EBADF_NEGATIVE
ERRNO_ECONNRESET_NEGATIVEback to summary
public static final int ERRNO_ECONNRESET_NEGATIVE
ERRNO_EINPROGRESS_NEGATIVEback to summary
public static final int ERRNO_EINPROGRESS_NEGATIVE
ERRNO_ENOENT_NEGATIVEback to summary
public static final int ERRNO_ENOENT_NEGATIVE
ERRNO_ENOTCONN_NEGATIVEback to summary
public static final int ERRNO_ENOTCONN_NEGATIVE
ERRNO_EPIPE_NEGATIVEback to summary
public static final int ERRNO_EPIPE_NEGATIVE
ERRNO_EWOULDBLOCK_NEGATIVEback to summary
public static final int ERRNO_EWOULDBLOCK_NEGATIVE
ERROR_EALREADY_NEGATIVEback to summary
public static final int ERROR_EALREADY_NEGATIVE
ERROR_ECONNREFUSED_NEGATIVEback to summary
public static final int ERROR_ECONNREFUSED_NEGATIVE
ERROR_EHOSTUNREACH_NEGATIVEback to summary
public static final int ERROR_EHOSTUNREACH_NEGATIVE
ERROR_EISCONN_NEGATIVEback to summary
public static final int ERROR_EISCONN_NEGATIVE
ERROR_ENETUNREACH_NEGATIVEback to summary
public static final int ERROR_ENETUNREACH_NEGATIVE
ERRORSback to summary
private static final String[] 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 Detail

Errorsback to summary
private Errors()

Method Detail

errnoStringback to summary
private static String errnoString(int err)
handleConnectErrnoback to summary
public static boolean handleConnectErrno(String method, int err) throws IOException
ioResultback to summary
public static int ioResult(String method, int err, Errors.NativeIoException resetCause, ClosedChannelException closedCause) throws IOException

Deprecated

Annotations
@Deprecated
ioResultback to summary
public static int ioResult(String method, int err) throws IOException
newConnectException0back to summary
private static IOException newConnectException0(String method, int err)
newConnectionResetExceptionback to summary
public static Errors.NativeIoException newConnectionResetException(String method, int errnoNegative)
newIOExceptionback to summary
public static Errors.NativeIoException newIOException(String method, int err)
throwConnectExceptionback to summary
public static void throwConnectException(String method, int err) throws IOException
Parameters
method:String

The native method name which caused the errno.

err:int

the negative value of the errno.

Annotations
@Deprecated
Exceptions
IOException:
The errno translated into an exception.
io.netty.channel.unix back to summary

pack-priv final Class Errors.NativeConnectException

extends ConnectException
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv
NativeConnectException(String method, int expectedErr)

Method Summary

Modifier and TypeMethod and Description
pack-priv int

Field Detail

expectedErrback to summary
private final int expectedErr
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.net.ConnectException.serialVersionUID.

Constructor Detail

NativeConnectExceptionback to summary
pack-priv NativeConnectException(String method, int expectedErr)

Method Detail

expectedErrback to summary
pack-priv int expectedErr()
io.netty.channel.unix back to summary

public final Class Errors.NativeIoException

extends IOException
Class Inheritance

Internal usage only!

Field Summary

Modifier and TypeField and Description
private final int
private final boolean
private static final long

Constructor Summary

AccessConstructor and Description
public
NativeIoException(String method, int expectedErr)

public
NativeIoException(String method, int expectedErr, boolean fillInStackTrace)

Method Summary

Modifier and TypeMethod and Description
public int
public synchronized Throwable
fillInStackTrace()

Overrides java.lang.Throwable.fillInStackTrace.

Fills in the execution stack trace.

Field Detail

expectedErrback to summary
private final int expectedErr
fillInStackTraceback to summary
private final boolean fillInStackTrace
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.io.IOException.serialVersionUID.

Constructor Detail

NativeIoExceptionback to summary
public NativeIoException(String method, int expectedErr)
NativeIoExceptionback to summary
public NativeIoException(String method, int expectedErr, boolean fillInStackTrace)

Method Detail

expectedErrback to summary
public int expectedErr()
fillInStackTraceback to summary
public synchronized Throwable fillInStackTrace()

Overrides java.lang.Throwable.fillInStackTrace.

Doc from java.lang.Throwable.fillInStackTrace.

Fills in the execution stack trace. This method records within this Throwable object information about the current state of the stack frames for the current thread.

If the stack trace of this Throwable is not writable, calling this method has no effect.

Returns:Throwable

a reference to this Throwable instance.

Annotations
@Override