org.directwebremoting.event
Class SessionProgressListener

java.lang.Object
  extended by org.directwebremoting.event.SessionProgressListener
All Implemented Interfaces:
java.io.Serializable, org.apache.commons.fileupload.ProgressListener

public class SessionProgressListener
extends java.lang.Object
implements org.apache.commons.fileupload.ProgressListener, java.io.Serializable

Progress listener that stores results in the user session.

Author:
Jose Noheda
See Also:
Serialized Form

Constructor Summary
SessionProgressListener()
           
 
Method Summary
 void cancel()
          Cancels the associated file upload.
 long getBytesRead()
          Accessor for the number of bytes read, as passed in by ProgressListener.update(long, long, int)
 long getContentLength()
          The total number of bytes, which are being read.
 long getItem()
          The number of the field, which is currently being read.
 void update(long newBytesRead, long newContentLength, int items)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionProgressListener

public SessionProgressListener()
Method Detail

getBytesRead

public long getBytesRead()
Accessor for the number of bytes read, as passed in by ProgressListener.update(long, long, int)


getContentLength

public long getContentLength()
The total number of bytes, which are being read. May be -1, if this number is unknown. Passed in by ProgressListener.update(long, long, int)


getItem

public long getItem()
The number of the field, which is currently being read. (0 = no item so far, 1 = first item is being read, ...)


update

public void update(long newBytesRead,
                   long newContentLength,
                   int items)
Specified by:
update in interface org.apache.commons.fileupload.ProgressListener

cancel

public void cancel()
Cancels the associated file upload.


Copyright ยจ 2008