Project: stp

com.ibm.rational.wvcm.stp
Interface StpProvider.NotifyBusyOption

Enclosing interface:
StpProvider

public static interface StpProvider.NotifyBusyOption

If the Callback object provided to an StpProvider implements this interface, the callback will be notified when the server reports that it is too busy to respond to a request.


Method Summary
 void notifyBusy(StpProvider.Domain domain, String realm, StpProvider provider, Date opStartTime, WvcmException busyFailure)
          A non-null busyFailure argument indicates the server has reported that it is too busy to process a request.
 

Method Detail

notifyBusy

void notifyBusy(StpProvider.Domain domain,
                String realm,
                StpProvider provider,
                Date opStartTime,
                WvcmException busyFailure)
                throws WvcmException
A non-null busyFailure argument indicates the server has reported that it is too busy to process a request. This method returns if and when that request is to be attempted again. It throws an exception to cancel the request.

A null busyFailure argument indicates that a request that was re-attempted has now been processed by the server. In this case, this method must return and should not throw an exception if it wants the operation to continue. This call with a null busyFailure argument is intended to give the callback an opportunity to take down any user presentation put up to indicate the operation was waiting for the server to respond.

This method is not called for every server request, even with a null busyFailure argument. It is invoked only when the server reports that it is too busy to process a request.

The method returns no value. If the client wants to retry the request a little later, the callback should put the current thread to sleep for a while to give the server time to catch up. Whenever this method returns, the request will be retried immediately.

If the client does not want to retry the request, it must throw an exception, such as the busyFailure exception passed into the method.

Parameters:
domain - The Domain in which the request was being executed.
realm - The authentication realm in which the request was being executed.
provider - The provider that is attempting to perform the request on the server.
opStartTime - A Date object representing the time at which the request was first initiated. This object is unique to the request being executed and the same object is passed to every invocation of this method resulting from any attempt to re-exeucte the request. Thus, it could be used by the callback as the key to a map containing progress history for this operation. It could also be compared to the current time to limit the time the client waits for the server.
busyFailure - The exception returned by the server to report that it was too busy to process the request. If this method returns normally and on the subsequent re-try the server processes the request this method is called with null for this argument. If the server still reports that it is busy this method will be called again with a non-null argument.

A null value for this argument does not necessarily mean that the operation was successful. It just means that the server was finally able to process the request. For example, after the server looks at the request, it may determine that authentication is required before proceeding or it may find something else wrong with it. This callback will be invoked to indicate that the busy state has been removed before processing the server response, whether it be positive or negative.

If completion of the operation requires multiple interactions with the server (as when authentication is needed), any of those interactions could find the server busy again. Hence, a null busyFailure argument does not indicate that this method will not be called another time for the same request (opStartTime).

Throws:
WvcmException - to abort the request.

Generated Tue 25-Jul-2017 08:41 PM

Copyright © IBM 2017. All rights reserved.