Signal Class — netty Architecture
Architecture documentation for the Signal class in Signal.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD fbd9e565_0d1d_a8b4_c7e9_398a4d4dc1b5["Signal"] a75566a8_92e6_6a98_7cd1_bcd1a37cdf3f["Signal.java"] fbd9e565_0d1d_a8b4_c7e9_398a4d4dc1b5 -->|defined in| a75566a8_92e6_6a98_7cd1_bcd1a37cdf3f 091b4d04_04ba_bdf9_6ed8_ba007472fbb8["Signal()"] fbd9e565_0d1d_a8b4_c7e9_398a4d4dc1b5 -->|method| 091b4d04_04ba_bdf9_6ed8_ba007472fbb8 56f88994_9733_6cfe_22d0_632c9abb9fd2["expect()"] fbd9e565_0d1d_a8b4_c7e9_398a4d4dc1b5 -->|method| 56f88994_9733_6cfe_22d0_632c9abb9fd2 132091da_1f14_0430_514a_d053a7038d95["Throwable()"] fbd9e565_0d1d_a8b4_c7e9_398a4d4dc1b5 -->|method| 132091da_1f14_0430_514a_d053a7038d95 e4681c9e_2e42_804e_a143_a283e9aa8831["id()"] fbd9e565_0d1d_a8b4_c7e9_398a4d4dc1b5 -->|method| e4681c9e_2e42_804e_a143_a283e9aa8831 d1ee9902_4d4f_2ce5_7e82_88f40317d0c9["String()"] fbd9e565_0d1d_a8b4_c7e9_398a4d4dc1b5 -->|method| d1ee9902_4d4f_2ce5_7e82_88f40317d0c9 f53d4e7a_7718_3dda_df24_d6e4e645cf0c["equals()"] fbd9e565_0d1d_a8b4_c7e9_398a4d4dc1b5 -->|method| f53d4e7a_7718_3dda_df24_d6e4e645cf0c 351a5d7d_da0f_00c5_0142_15e9101551cc["hashCode()"] fbd9e565_0d1d_a8b4_c7e9_398a4d4dc1b5 -->|method| 351a5d7d_da0f_00c5_0142_15e9101551cc f36212f7_db58_52a3_a165_acda1dacf0bc["compareTo()"] fbd9e565_0d1d_a8b4_c7e9_398a4d4dc1b5 -->|method| f36212f7_db58_52a3_a165_acda1dacf0bc
Relationship Graph
Source Code
common/src/main/java/io/netty/util/Signal.java lines 23–118
public final class Signal extends Error implements Constant<Signal> {
private static final long serialVersionUID = -221145131122459977L;
private static final ConstantPool<Signal> pool = new ConstantPool<Signal>() {
@Override
protected Signal newConstant(int id, String name) {
return new Signal(id, name);
}
};
/**
* Returns the {@link Signal} of the specified name.
*/
public static Signal valueOf(String name) {
return pool.valueOf(name);
}
/**
* Shortcut of {@link #valueOf(String) valueOf(firstNameComponent.getName() + "#" + secondNameComponent)}.
*/
public static Signal valueOf(Class<?> firstNameComponent, String secondNameComponent) {
return pool.valueOf(firstNameComponent, secondNameComponent);
}
private final SignalConstant constant;
/**
* Creates a new {@link Signal} with the specified {@code name}.
*/
private Signal(int id, String name) {
constant = new SignalConstant(id, name);
}
/**
* Check if the given {@link Signal} is the same as this instance. If not an {@link IllegalStateException} will
* be thrown.
*/
public void expect(Signal signal) {
if (this != signal) {
throw new IllegalStateException("unexpected signal: " + signal);
}
}
// Suppress a warning since the method doesn't need synchronization
@Override
public Throwable initCause(Throwable cause) {
return this;
}
// Suppress a warning since the method doesn't need synchronization
@Override
public Throwable fillInStackTrace() {
return this;
}
@Override
public int id() {
return constant.id();
}
@Override
public String name() {
return constant.name();
}
@Override
public boolean equals(Object obj) {
return this == obj;
}
@Override
public int hashCode() {
return System.identityHashCode(this);
}
@Override
public int compareTo(Signal other) {
if (this == other) {
return 0;
}
Source
Frequently Asked Questions
What is the Signal class?
Signal is a class in the netty codebase, defined in common/src/main/java/io/netty/util/Signal.java.
Where is Signal defined?
Signal is defined in common/src/main/java/io/netty/util/Signal.java at line 23.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free