Code example for Closer

Methods: close

0
 
    @Override 
    public final void completed(V result, A attachment)
    { 
        try { 
            _closer.close();
            onSuccess(result, attachment);
            _completionHandler.completed(result, attachment);
        } catch (Throwable t) {
            fail(t, attachment);
        } 
    } 
 
    @Override 
    public final void failed(Throwable exc, A attachment)
    { 
        /* This weird looking code is to fulfill the contract of Closer. 
         * It ensures that suppressed exceptions from the Closeables are 
         * handled correctly. 
         */ 
Contextual code suggestions in your IDE  Get Codota for Java