From dfe7b155b7f8383677c4930229a6b7a2b5ef5ba8 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Tue, 11 Nov 2014 17:14:05 -0500 Subject: [PATCH] Just add some documentation for the @Destroy annotation --- hapi-deployable-pom/pom.xml | 4 ++-- pom.xml | 2 +- src/changes/changes.xml | 8 ++++++++ src/site/xdoc/doc_rest_server.xml | 19 +++++++++++++++++-- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index 509190cb4b0..c54c52212b4 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -39,8 +39,8 @@ - http://docs.oracle.com/javaee/7/api - http://jamesagnew.github.io/hapi-fhir/apidocs + http://jamesagnew.github.io/hapi-fhir/apidocs/ + https://docs.oracle.com/javaee/7/api/ diff --git a/pom.xml b/pom.xml index 074ef1fad9b..aa6cfd9acce 100644 --- a/pom.xml +++ b/pom.xml @@ -136,7 +136,7 @@ 4.11 1.1.2 2.4.1 - 2.9.1 + 2.10.1 1.7 2.17 3.4 diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 56d16e85394..0caaa6e9e31 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -51,6 +51,14 @@ returns a default Patient, but sometimes uses a custom subclass). Thanks to Bill de Beaubien for the pull request! + + Introduced a new + @Destroy]]> annotation which can be added to + a resource provider method. This method will be called by the server when it + is being closed/destroyed (e.g. when the application is being undeployed, the + container is being shut down, etc.) + Thanks to Bill de Beaubien for the pull request! + Add a new method to the server interceptor framework which allows interceptors to be notified of any exceptions and diff --git a/src/site/xdoc/doc_rest_server.xml b/src/site/xdoc/doc_rest_server.xml index 98a2e7c2700..859a206ad7d 100644 --- a/src/site/xdoc/doc_rest_server.xml +++ b/src/site/xdoc/doc_rest_server.xml @@ -471,7 +471,22 @@ - + + + +
+ +

+ Resource providers may optionally want to be notified when the server they are registered + with is being destroyed, so that they can perform cleanup. In this case, a method + annotated with the + @Destroy annotation can be added (this method should be public, return void, + and take no parameters). +

+

+ This method will be invoked once by the RestfulServer when it is shutting down. +

+
@@ -479,7 +494,7 @@

A complete example showing how to implement a RESTful server can be found in our Git repo here: - http://sourceforge.net/p/hl7api/fhircode/ci/master/tree/restful-server-example/ + https://github.com/jamesagnew/hapi-fhir/tree/master/restful-server-example