com.eviware.soapui.impl.wsdl.monitor
Class SlowLinkSimulator

java.lang.Object
  extended by com.eviware.soapui.impl.wsdl.monitor.SlowLinkSimulator

public class SlowLinkSimulator
extends java.lang.Object

class to simulate slow connections by slowing down the system


Constructor Summary
SlowLinkSimulator(int delayBytes, int delayTime)
          construct
SlowLinkSimulator(SlowLinkSimulator that)
          construct by copying delay bytes and time, but not current count of bytes
 
Method Summary
 int getCurrentBytes()
          get the current byte count
 int getTotalBytes()
          how many bytes have gone past?
 void pump(int bytes)
          log #of bytes pumped.
 void setCurrentBytes(int currentBytes)
          set the current byte count
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlowLinkSimulator

public SlowLinkSimulator(int delayBytes,
                         int delayTime)
construct

Parameters:
delayBytes - bytes per delay; set to 0 for no delay
delayTime - delay time per delay in milliseconds

SlowLinkSimulator

public SlowLinkSimulator(SlowLinkSimulator that)
construct by copying delay bytes and time, but not current count of bytes

Parameters:
that - source of data
Method Detail

getTotalBytes

public int getTotalBytes()
how many bytes have gone past?

Returns:
integer

pump

public void pump(int bytes)
log #of bytes pumped. Will pause when necessary. This method is not synchronized

Parameters:
bytes -

getCurrentBytes

public int getCurrentBytes()
get the current byte count

Returns:
integer

setCurrentBytes

public void setCurrentBytes(int currentBytes)
set the current byte count

Parameters:
currentBytes -


Copyright © 2005-2008 eviware.com. All Rights Reserved.