From cf473316e6ec1e39ef72df4666ef7c5e63b24b7e Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 8 May 2020 17:00:15 +0200 Subject: [PATCH] Able to get the EndPoint type now, if you want --- src/dorkbox/network/connection/Shutdownable.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/dorkbox/network/connection/Shutdownable.java b/src/dorkbox/network/connection/Shutdownable.java index e91b63dc..67a5e286 100644 --- a/src/dorkbox/network/connection/Shutdownable.java +++ b/src/dorkbox/network/connection/Shutdownable.java @@ -121,7 +121,7 @@ class Shutdownable { protected final ThreadGroup threadGroup; - protected final Class type; + private final Class type; protected final Object shutdownInProgress = new Object(); private volatile boolean isShutdown = false; @@ -486,8 +486,19 @@ class Shutdownable { return "EndPoint [" + getName() + "]"; } + /** + * @return the type class of this connection endpoint + */ + public Class getType() { + return type; + } + + /** + * @return the simple name (for the class) of this connection endpoint + */ public String getName() { return type.getSimpleName(); } + }