diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-03-06 09:48:54 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-03-06 09:48:54 +0100 |
commit | 9dd4c4880b42dd17c3bbaf1662eee9d8bbcad748 (patch) | |
tree | f9e8639fd015093c033c189bc00c94a2bac2087b /jdisc_core/src/main/java/com/yahoo/jdisc | |
parent | 351903b75e5cf8feaa6606c139ee56e1caeccd23 (diff) |
Shutdown renderer threads on deconstruct
Diffstat (limited to 'jdisc_core/src/main/java/com/yahoo/jdisc')
4 files changed, 15 insertions, 11 deletions
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java b/jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java index 9862e574009..3ed10170420 100644 --- a/jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java +++ b/jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java @@ -18,7 +18,7 @@ import java.util.logging.Logger; * all subclasses of {@link RequestHandler}, {@link ClientProvider} and {@link ServerProvider}. Once the reference count * of this resource reaches zero, the {@link #destroy()} method is called.</p> * - * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + * @author Simon Thoresen */ public abstract class AbstractResource implements SharedResource { diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/SharedResource.java b/jdisc_core/src/main/java/com/yahoo/jdisc/SharedResource.java index 4552ba3fe3a..16af346c4f3 100644 --- a/jdisc_core/src/main/java/com/yahoo/jdisc/SharedResource.java +++ b/jdisc_core/src/main/java/com/yahoo/jdisc/SharedResource.java @@ -23,11 +23,12 @@ import com.yahoo.jdisc.service.ServerProvider; * in terms of resource ownership. You retain a resource to prevent it from being destroyed while you are using it, and * you release a resource once you are done using it.</p> * - * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + * @author Simon Thoresen */ public interface SharedResource { - public static final String SYSTEM_PROPERTY_NAME_DEBUG = "jdisc.debug.resources"; - public static final boolean DEBUG = Boolean.valueOf(System.getProperty(SYSTEM_PROPERTY_NAME_DEBUG)); + + String SYSTEM_PROPERTY_NAME_DEBUG = "jdisc.debug.resources"; + boolean DEBUG = Boolean.valueOf(System.getProperty(SYSTEM_PROPERTY_NAME_DEBUG)); /** * <p>Increments the reference count of this resource. You call this method to prevent an object from being @@ -51,4 +52,5 @@ public interface SharedResource { * @see ResourceReference */ void release(); + } diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/handler/AbstractRequestHandler.java b/jdisc_core/src/main/java/com/yahoo/jdisc/handler/AbstractRequestHandler.java index 9bc934cf724..86f0d115379 100644 --- a/jdisc_core/src/main/java/com/yahoo/jdisc/handler/AbstractRequestHandler.java +++ b/jdisc_core/src/main/java/com/yahoo/jdisc/handler/AbstractRequestHandler.java @@ -25,7 +25,7 @@ import com.yahoo.jdisc.Response; * } * </pre> * - * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + * @author Simon Thoresen */ public abstract class AbstractRequestHandler extends com.yahoo.jdisc.AbstractResource implements RequestHandler { @@ -33,4 +33,5 @@ public abstract class AbstractRequestHandler extends com.yahoo.jdisc.AbstractRes public void handleTimeout(Request request, ResponseHandler responseHandler) { Response.dispatchTimeout(responseHandler); } + } diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/handler/RequestHandler.java b/jdisc_core/src/main/java/com/yahoo/jdisc/handler/RequestHandler.java index 3fc3dbb8a82..24d6902228e 100644 --- a/jdisc_core/src/main/java/com/yahoo/jdisc/handler/RequestHandler.java +++ b/jdisc_core/src/main/java/com/yahoo/jdisc/handler/RequestHandler.java @@ -13,12 +13,12 @@ import com.yahoo.jdisc.application.UriPattern; import java.util.concurrent.TimeUnit; /** - * <p>This interface defines a component that is capable of acting as a handler for a {@link Request}. To activate a + * This interface defines a component that is capable of acting as a handler for a {@link Request}. To activate a * RequestHandler it must be {@link BindingRepository#bind(String, Object) bound} to a {@link UriPattern} within a * {@link ContainerBuilder}, and that builder must be {@link ContainerActivator#activateContainer(ContainerBuilder) - * activated}.</p> -* - * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + * activated}. + * + * @author Simon Thoresen */ public interface RequestHandler extends SharedResource { @@ -39,7 +39,7 @@ public interface RequestHandler extends SharedResource { * @return The ContentChannel to write the Request content to. Notice that the ContentChannel itself also holds a * Container reference, so failure to close this will prevent the Container from ever shutting down. */ - public ContentChannel handleRequest(Request request, ResponseHandler handler); + ContentChannel handleRequest(Request request, ResponseHandler handler); /** * <p>This method is called by the {@link Container} when a {@link Request} that was previously accepted by {@link @@ -58,5 +58,6 @@ public interface RequestHandler extends SharedResource { * @param handler The handler to pass the timeout {@link Response} to. * @see Response#dispatchTimeout(ResponseHandler) */ - public void handleTimeout(Request request, ResponseHandler handler); + void handleTimeout(Request request, ResponseHandler handler); + } |