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 specialErrorwhich is used to signal some state or request by throwing it.Signalhas 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 intcompareTo(Signal other)booleanequals(Object obj)voidexpect(Signal signal)Check if the givenSignalis the same as this instance.ThrowablefillInStackTrace()inthashCode()intid()Returns the unique number assigned to thisConstant.ThrowableinitCause(Throwable cause)Stringname()Returns the name of thisConstant.StringtoString()static SignalvalueOf(Class<?> firstNameComponent, String secondNameComponent)static SignalvalueOf(String name)Returns theSignalof 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 givenSignalis the same as this instance. If not anIllegalStateExceptionwill be thrown.
-
fillInStackTrace
public Throwable fillInStackTrace()
- Overrides:
fillInStackTracein classThrowable
-
id
public int id()
Description copied from interface:ConstantReturns the unique number assigned to thisConstant.
-
name
public String name()
Description copied from interface:ConstantReturns the name of thisConstant.
-
compareTo
public int compareTo(Signal other)
- Specified by:
compareToin interfaceComparable<Signal>
-
-