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>
public final class Signal extends Error implements Constant<Signal>
A specialError
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:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Signal other)
boolean
equals(Object obj)
void
expect(Signal signal)
Check if the givenSignal
is the same as this instance.Throwable
fillInStackTrace()
int
hashCode()
int
id()
Returns the unique number assigned to thisConstant
.Throwable
initCause(Throwable cause)
String
name()
Returns the name of thisConstant
.String
toString()
static Signal
valueOf(Class<?> firstNameComponent, String secondNameComponent)
static Signal
valueOf(String name)
Returns theSignal
of the specified name.-
Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Method Detail
-
expect
public void expect(Signal signal)
Check if the givenSignal
is the same as this instance. If not anIllegalStateException
will be thrown.
-
fillInStackTrace
public Throwable fillInStackTrace()
- Overrides:
fillInStackTrace
in classThrowable
-
id
public int id()
Description copied from interface:Constant
Returns the unique number assigned to thisConstant
.
-
name
public String name()
Description copied from interface:Constant
Returns the name of thisConstant
.
-
compareTo
public int compareTo(Signal other)
- Specified by:
compareTo
in interfaceComparable<Signal>
-
-