Able to get the EndPoint type now, if you want
This commit is contained in:
parent
1cf4457f77
commit
cf473316e6
@ -121,7 +121,7 @@ class Shutdownable {
|
|||||||
|
|
||||||
protected final ThreadGroup threadGroup;
|
protected final ThreadGroup threadGroup;
|
||||||
|
|
||||||
protected final Class<? extends Shutdownable> type;
|
private final Class<? extends Shutdownable> type;
|
||||||
|
|
||||||
protected final Object shutdownInProgress = new Object();
|
protected final Object shutdownInProgress = new Object();
|
||||||
private volatile boolean isShutdown = false;
|
private volatile boolean isShutdown = false;
|
||||||
@ -486,8 +486,19 @@ class Shutdownable {
|
|||||||
return "EndPoint [" + getName() + "]";
|
return "EndPoint [" + getName() + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the type class of this connection endpoint
|
||||||
|
*/
|
||||||
|
public Class<? extends Shutdownable> getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the simple name (for the class) of this connection endpoint
|
||||||
|
*/
|
||||||
public
|
public
|
||||||
String getName() {
|
String getName() {
|
||||||
return type.getSimpleName();
|
return type.getSimpleName();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user