FileDocCategorySizeDatePackage
RetryTimer.javaAPI DocExample3661Tue Jun 12 15:41:34 BST 2007com.sun.xml.ws.rm.jaxws.runtime.client

RetryTimer

public class RetryTimer extends Object
RetryTimer replaces RMSource$RetryThread. It uses a java.util.Timer whose TimerTask executes the doMaintenanceTasks method in each ClientOutboundSequence.

Fields Summary
private final RMSource
source
private Timer
timer
private int
sequences
Constructors Summary
public RetryTimer(RMSource source)

    
         
       
        this.source = source;
    
Methods Summary
public voidstart()
No need to synchronize stop and start because they are only called from inside the bodies of RMSource.start and RMSource.stop

        
        if (timer != null) {
            throw new IllegalStateException();
        }
        timer = new Timer(true);
        timer.schedule(new RetryTask(),
                source.getRetryInterval(),
                source.getRetryInterval());
        
    
public voidstop()

        
        if (timer == null) {
            throw new IllegalStateException();
        }
        timer.cancel();
        timer = null;