com.samskivert.servlet.util
Class ServiceWaiter<T>
java.lang.Object
com.samskivert.util.ServiceWaiter<T>
com.samskivert.servlet.util.ServiceWaiter<T>
- All Implemented Interfaces:
- ResultListener<T>
public class ServiceWaiter<T>
- extends ServiceWaiter<T>
Extends the basic ServiceWaiter to be useful for servlets.
|
Field Summary |
static int |
NO_TIMEOUT
Timeout to specify when you don't want a timeout. |
|
Constructor Summary |
ServiceWaiter()
Construct a ServiceWaiter with the default (30 second) timeout. |
ServiceWaiter(int timeout)
Construct a ServiceWaiter with the specified timeout. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_TIMEOUT
public static final int NO_TIMEOUT
- Timeout to specify when you don't want a timeout. Use at your own
risk.
- See Also:
- Constant Field Values
ServiceWaiter
public ServiceWaiter()
- Construct a ServiceWaiter with the default (30 second) timeout.
ServiceWaiter
public ServiceWaiter(int timeout)
- Construct a ServiceWaiter with the specified timeout.
- Parameters:
timeout - the timeout, in seconds.
awaitFriendlyResponse
public boolean awaitFriendlyResponse(String friendlyText)
throws FriendlyException
- Blocks waiting for the response.
- Returns:
- true if a success response was posted, false if a failure
repsonse was posted.
- Throws:
FriendlyException
Copyright © 2000-2008 Michael Bayne.
All Rights Reserved.