com.flexive.shared.stream
Class BinaryUploadPayload

java.lang.Object
  extended by com.flexive.shared.stream.BinaryUploadPayload
All Implemented Interfaces:
java.io.Serializable

public final class BinaryUploadPayload
extends java.lang.Object
implements java.io.Serializable

Payload for binary uploads.

Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Constructor Summary
BinaryUploadPayload()
           
BinaryUploadPayload(boolean serverError, java.lang.String msg)
          Server side constructor incase of errors
BinaryUploadPayload(long expectedLength, long timeToLive)
          Constructor for the 'calling user'
BinaryUploadPayload(long expectedLength, long timeToLive, java.lang.String mimeType)
          Constructor for the 'calling user'
BinaryUploadPayload(java.lang.String handle)
          Server side constructor
BinaryUploadPayload(java.lang.String handle, java.lang.String mimeType)
          Server side constructor with mimeType
 
Method Summary
 long getActualLength()
          Get the actual content length
 int getDivision()
           
 java.lang.String getErrorMessage()
           
 long getExpectedLength()
           
 java.lang.String getHandle()
           
 java.lang.String getMimeType()
          Get the passed mimeType for this binary (will be used if auto-detection fails)
 long getTimeToLive()
           
 boolean isFinished()
           
 boolean isServerError()
           
 void setActualLength(long actualLength)
          Set the actual content length after the stream has been transfered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryUploadPayload

public BinaryUploadPayload(long expectedLength,
                           long timeToLive)
Constructor for the 'calling user'

Parameters:
expectedLength - expected length of the stream/binary
timeToLive - desired TTL

BinaryUploadPayload

public BinaryUploadPayload(long expectedLength,
                           long timeToLive,
                           java.lang.String mimeType)
Constructor for the 'calling user'

Parameters:
expectedLength - expected length of the stream/binary
timeToLive - desired TTL
mimeType - mime type

BinaryUploadPayload

public BinaryUploadPayload(java.lang.String handle)
Server side constructor

Parameters:
handle - db handle assigned to the binary

BinaryUploadPayload

public BinaryUploadPayload(java.lang.String handle,
                           java.lang.String mimeType)
Server side constructor with mimeType

Parameters:
handle - db handle assigned to the binary
mimeType - mime type

BinaryUploadPayload

public BinaryUploadPayload(boolean serverError,
                           java.lang.String msg)
Server side constructor incase of errors

Parameters:
serverError - error occured
msg - error message

BinaryUploadPayload

public BinaryUploadPayload()
Method Detail

getExpectedLength

public long getExpectedLength()

getHandle

public java.lang.String getHandle()

isServerError

public boolean isServerError()

getErrorMessage

public java.lang.String getErrorMessage()

getTimeToLive

public long getTimeToLive()

getDivision

public int getDivision()

isFinished

public boolean isFinished()

getActualLength

public long getActualLength()
Get the actual content length

Returns:
actual content length
Since:
3.1

setActualLength

public void setActualLength(long actualLength)
Set the actual content length after the stream has been transfered

Parameters:
actualLength - actual length of the content
Since:
3.1

getMimeType

public java.lang.String getMimeType()
Get the passed mimeType for this binary (will be used if auto-detection fails)

Returns:
mimeType
Since:
3.1