Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.threading
Interface CompletionHandler<V,A>

Type Parameters:
V - the result type of the operation
A - the type of the object attached to the operation
All Known Implementing Classes:
ClusterProtocolImpl.CompletionHelper

public interface CompletionHandler<V,A>

A handler for consuming the result of an asynchronous operation.
The completed() method is invoked when the operation completes successfully. The failed() method is invoked if the operation fails.

Note: The implementations of these methods should complete in a timely manner so as to avoid keeping the invoking thread from dispatching to other completion handlers and event handlers.


Method Summary
 void completed(V result, A attachment)
          Invoked when an operation has completed.
 void failed(java.lang.Throwable exc, A attachment)
          Invoked when an operation fails.
 

Method Detail

completed

void completed(V result,
               A attachment)
Invoked when an operation has completed.

Parameters:
result - the result of the operation
attachment - the object attached to the operation when it was initiated

failed

void failed(java.lang.Throwable exc,
            A attachment)
Invoked when an operation fails.

Parameters:
exc - the exception to indicate why the operation failed
attachment - the object attached to the operation when it was initiated

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.