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);
Parent topic: Programming interfaces
Related reference
Component interface
DataFactory interface
EndPointReference interface
EndPointReferenceFactory interface
Service exceptions
InterfaceType interface
Service interface
ServiceCallback interface
ServiceImplAsync interface
ServiceImplSync interface
ServiceManager class
Related information
Interface Ticket API
Last updated: Tue Sep 20 03:22:37 2005
Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)