Package io.netty.util
Class Signal
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Error
-
- io.netty.util.Signal
-
public final class Signal extends java.lang.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(java.lang.Object obj)voidexpect(Signal signal)Check if the givenSignalis the same as this instance.java.lang.ThrowablefillInStackTrace()inthashCode()intid()Returns the unique number assigned to thisConstant.java.lang.ThrowableinitCause(java.lang.Throwable cause)java.lang.Stringname()Returns the name of thisConstant.java.lang.StringtoString()static SignalvalueOf(java.lang.Class<?> firstNameComponent, java.lang.String secondNameComponent)static SignalvalueOf(java.lang.String name)Returns theSignalof the specified name.
-
-
-
Method Detail
-
valueOf
public static Signal valueOf(java.lang.String name)
Returns theSignalof the specified name.
-
valueOf
public static Signal valueOf(java.lang.Class<?> firstNameComponent, java.lang.String secondNameComponent)
-
expect
public void expect(Signal signal)
Check if the givenSignalis the same as this instance. If not anIllegalStateExceptionwill be thrown.
-
initCause
public java.lang.Throwable initCause(java.lang.Throwable cause)
- Overrides:
initCausein classjava.lang.Throwable
-
fillInStackTrace
public java.lang.Throwable fillInStackTrace()
- Overrides:
fillInStackTracein classjava.lang.Throwable
-
id
public int id()
Description copied from interface:ConstantReturns the unique number assigned to thisConstant.
-
name
public java.lang.String name()
Description copied from interface:ConstantReturns the name of thisConstant.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(Signal other)
- Specified by:
compareToin interfacejava.lang.Comparable<Signal>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Throwable
-
-