Skip to content

Commit

Permalink
Added close method, jakartaee#108
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviercailloux committed Dec 16, 2018
1 parent 431d4bd commit bbdd2da
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions api/src/main/java/javax/json/bind/Jsonb.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,17 @@ public interface Jsonb extends AutoCloseable {
* @since JSON Binding 1.0
*/
void toJson(Object object, Type runtimeType, OutputStream stream) throws JsonbException;

/**
* Closes this resource, relinquishing any underlying resources. In particular,
* cleans up all CDI managed components (such as adapters with CDI dependencies)
* created during interaction with Jsonb. {@code close()} must be called after
* all threads have finished interaction with Jsonb. If there are remaining
* threads working with Jsonb after {@code close()} has been called, behaviour
* is undefined.
*
* @throws JsonbException If any unexpected problem occurs during the close.
*/
@Override
void close() throws JsonbException;
}

0 comments on commit bbdd2da

Please sign in to comment.