Just add some documentation for the @Destroy annotation

This commit is contained in:
James Agnew 2014-11-11 17:14:05 -05:00
parent 374d95ea76
commit dfe7b155b7
4 changed files with 28 additions and 5 deletions

View File

@ -39,8 +39,8 @@
</reports>
<configuration>
<links>
<link>http://docs.oracle.com/javaee/7/api</link>
<link>http://jamesagnew.github.io/hapi-fhir/apidocs</link>
<link>http://jamesagnew.github.io/hapi-fhir/apidocs/</link>
<link>https://docs.oracle.com/javaee/7/api/</link>
</links>
</configuration>
</reportSet>

View File

@ -136,7 +136,7 @@
<junit_version>4.11</junit_version>
<logback_version>1.1.2</logback_version>
<maven_assembly_plugin_version>2.4.1</maven_assembly_plugin_version>
<maven_javadoc_plugin_version>2.9.1</maven_javadoc_plugin_version>
<maven_javadoc_plugin_version>2.10.1</maven_javadoc_plugin_version>
<maven_license_plugin_version>1.7</maven_license_plugin_version>
<maven_surefire_plugin_version>2.17</maven_surefire_plugin_version>
<maven_site_plugin_version>3.4</maven_site_plugin_version>

View File

@ -51,6 +51,14 @@
returns a default Patient, but sometimes uses a custom subclass).
Thanks to Bill de Beaubien for the pull request!
</action>
<action type="add" issue="49" dev="wdebeau1">
Introduced a new
<![CDATA[<code>@Destroy</code>]]> 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!
</action>
<action type="add">
Add a new method <![CDATA[handleException]]> to the server interceptor
framework which allows interceptors to be notified of any exceptions and

View File

@ -471,7 +471,22 @@
<param name="id" value="serverMethod" />
<param name="file" value="examples/src/main/java/example/ServerMetadataExamples.java" />
</macro>
</section>
<section name="Server Lifecycle Methods">
<p>
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
<code>@Destroy</code> annotation can be added (this method should be public, return <code>void</code>,
and take no parameters).
</p>
<p>
This method will be invoked once by the RestfulServer when it is shutting down.
</p>
</section>
<section name="A Complete Example">
@ -479,7 +494,7 @@
<p>
A complete example showing how to implement a RESTful server can
be found in our Git repo here:
<a href="http://sourceforge.net/p/hl7api/fhircode/ci/master/tree/restful-server-example/">http://sourceforge.net/p/hl7api/fhircode/ci/master/tree/restful-server-example/</a>
<a href="https://github.com/jamesagnew/hapi-fhir/tree/master/restful-server-example">https://github.com/jamesagnew/hapi-fhir/tree/master/restful-server-example</a>
</p>
<p>