Package io.netty.util
Class Signal
java.lang.Object
java.lang.Throwable
java.lang.Error
io.netty.util.Signal
- All Implemented Interfaces:
Constant<Signal>
,Serializable
,Comparable<Signal>
A special
Error
which is used to signal some state or request by throwing it.
Signal
has an empty stack trace and has no cause to save the instantiation overhead.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Signal.SignalConstant
private static final ConstantPool
<Signal> private static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
void
Check if the givenSignal
is the same as this instance.int
hashCode()
int
id()
Returns the unique number assigned to thisConstant
.name()
Returns the name of thisConstant
.toString()
static Signal
static Signal
Returns theSignal
of the specified name.Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
pool
-
constant
-
-
Constructor Details
-
Signal
Creates a newSignal
with the specifiedname
.
-
-
Method Details
-
valueOf
Returns theSignal
of the specified name. -
valueOf
-
expect
Check if the givenSignal
is the same as this instance. If not anIllegalStateException
will be thrown. -
initCause
-
fillInStackTrace
- Overrides:
fillInStackTrace
in classThrowable
-
id
public int id()Description copied from interface:Constant
Returns the unique number assigned to thisConstant
. -
name
Description copied from interface:Constant
Returns the name of thisConstant
. -
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Signal>
-
toString
-