Package io.netty.util
Class Signal
java.lang.Object
java.lang.Throwable
java.lang.Error
io.netty.util.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.SignalConstantprivate static final ConstantPool<Signal> private static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanequals(java.lang.Object obj) voidCheck if the givenSignalis the same as this instance.java.lang.ThrowableinthashCode()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.Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTraceMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
pool
-
constant
-
-
Constructor Details
-
Signal
private Signal(int id, java.lang.String name) Creates a newSignalwith the specifiedname.
-
-
Method Details
-
valueOf
Returns theSignalof the specified name. -
valueOf
public static Signal valueOf(java.lang.Class<?> firstNameComponent, java.lang.String secondNameComponent) -
expect
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
- Specified by:
compareToin interfacejava.lang.Comparable<Signal>
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Throwable
-