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

Field Summary
static java.lang.String CANCEL_UPLOAD
          The attribute that indicates if the user wants to cancel the upload.
 
Constructor Summary
SessionProgressListener(javax.servlet.http.HttpSession session)
           
 
Method Summary
 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
 

Field Detail

CANCEL_UPLOAD

public static final java.lang.String CANCEL_UPLOAD
The attribute that indicates if the user wants to cancel the upload.

See Also:
Constant Field Values
Constructor Detail

SessionProgressListener

public SessionProgressListener(javax.servlet.http.HttpSession session)
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

Copyright 2008