protected abstract class FailoverProvider.FailoverRequest extends WrappedAsyncResult implements Runnable
Modifier and Type | Field and Description |
---|---|
protected long |
id |
Constructor and Description |
---|
FailoverRequest(AsyncResult watcher) |
FailoverRequest(AsyncResult watcher,
long requestTimeout) |
Modifier and Type | Method and Description |
---|---|
javax.jms.JMSException |
createTimedOutException() |
abstract void |
doTask()
Called to execute the specific task that was requested.
|
boolean |
failureWhenOffline()
When the transport is not connected should this request automatically fail.
|
boolean |
isExpired() |
void |
onFailure(Throwable result)
If the operation fails this method is invoked with the Exception
that caused the failure.
|
void |
onSuccess()
If the operation succeeds the resulting value produced is set to null and
the waiting parties are signaled.
|
void |
run() |
boolean |
succeedsWhenOffline()
Should the request just succeed when the Provider is not connected.
|
getWrappedRequest, isComplete
public FailoverRequest(AsyncResult watcher)
public FailoverRequest(AsyncResult watcher, long requestTimeout)
public void onFailure(Throwable result)
AsyncResult
onFailure
in interface AsyncResult
onFailure
in class WrappedAsyncResult
result
- The error that resulted in this asynchronous operation failing.public void onSuccess()
AsyncResult
onSuccess
in interface AsyncResult
onSuccess
in class WrappedAsyncResult
public abstract void doTask() throws Exception
Exception
- if an error occurs during task execution.public boolean succeedsWhenOffline()
public boolean failureWhenOffline()
public boolean isExpired()
public javax.jms.JMSException createTimedOutException()
Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.