01: /*
02: * Portions Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04: *
05: * This code is free software; you can redistribute it and/or modify it
06: * under the terms of the GNU General Public License version 2 only, as
07: * published by the Free Software Foundation. Sun designates this
08: * particular file as subject to the "Classpath" exception as provided
09: * by Sun in the LICENSE file that accompanied this code.
10: *
11: * This code is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14: * version 2 for more details (a copy is included in the LICENSE file that
15: * accompanied this code).
16: *
17: * You should have received a copy of the GNU General Public License version
18: * 2 along with this work; if not, write to the Free Software Foundation,
19: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20: *
21: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22: * CA 95054 USA or visit www.sun.com if you need additional information or
23: * have any questions.
24: */
25: package com.sun.xml.internal.ws.client;
26:
27: import com.sun.xml.internal.ws.client.ResponseContext;
28:
29: import javax.xml.ws.Response;
30: import java.rmi.server.UID;
31: import java.util.Map;
32: import java.util.concurrent.Callable;
33: import java.util.concurrent.FutureTask;
34: import java.util.concurrent.locks.Lock;
35: import java.util.concurrent.locks.ReentrantLock;
36: import java.util.logging.Logger;
37:
38: /**
39: * The <code>Response</code> interface provides methods used to obtain the
40: * payload and context a message sent in response to an operation invocation.
41: * For asynchronous operation invocations it provides additional methods to
42: * check the status of the request.
43: *
44: * @author JAXWS Development Team
45: * @version 1.0
46: */
47:
48: public class WSFuture<T> extends FutureTask<T> {
49: private static final Logger logger = Logger
50: .getLogger(new StringBuffer()
51: .append(
52: com.sun.xml.internal.ws.util.Constants.LoggingDomain)
53: .append(".client.dispatch").toString());
54:
55: private Lock _lock;
56:
57: public WSFuture(Callable<T> callable) {
58: super (callable);
59: _lock = new ReentrantLock();
60: }
61:
62: public WSFuture(Runnable runable, T result) {
63: super (runable, result);
64: _lock = new ReentrantLock();
65: }
66: }
|