This interface represents a correlation object that ties an asynchronous service request and response together.
Use this interface to provide communication between an asynchronous service and a client. When the service completes processing a client request, it uses the ticket to contact the client with the response through the serviceCallback interface.
A ticket is long lived, can be persisted and reused across threads and processes. A ticket also implements the equals and hashCode methods, which allow it to be used as a key.
public interface StockQuoteAsync { // deferred response public Ticket getQuoteAsync(String symbol); public float getQuoteResponse(Ticket ticket, long timeout); // callback public Ticket getQuoteAsync(String symbol, StockQuoteCallback callback); }
StockQuoteAsync sQ = (StockQuoteAsync)serviceManager.locateService(“stockQuote"); Ticket ticket = stockQuote.getQuoteAsync("IBM"); // do something else float quote = stockQuote.getQuoteResponse(ticket, Service.WAIT);
Last updated: Thu Apr 27 14:35:54 2006
(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)