org.ws4d.java.configuration
Class AttachmentProperties

java.lang.Object
  extended by org.ws4d.java.configuration.AttachmentProperties
All Implemented Interfaces:
PropertiesHandler

public class AttachmentProperties
extends java.lang.Object
implements PropertiesHandler


Field Summary
static java.lang.String PROP_ATTACHMENT_STORE_POLICY
          Attachment store policy in use
Default: AttachmentStore.POLICY_MEM_BUFFER
static java.lang.String PROP_MAX_ATTACHMENT_SIZE
          Maximum attachment size in bytes to accept
Default: 16777216
static java.lang.String PROP_MAX_MEM_BUFFER_SIZE
          Maximum size in bytes for which attachment raw data can be kept into memory when using AttachmentStore.POLICY_MEM_BUFFER.
static java.lang.String PROP_READ_BUFFER_SIZE
          Size of buffer to allocate when reading in attachments from a network or file stream.
static java.lang.String PROP_STORE_PATH
          Path to the file system location where temporary attachment files should be stored.
static java.lang.String PROP_STREAM_BUFFER_SIZE
          Size of buffer to allocate when reading in attachments with streaming support, see InputStreamAttachment and AttachmentStore.getStreamingMediaTypes().
static java.lang.String PROP_STREAMING_MEDIA_TYPES
          MIME types to stream when sending as attachments.
 
Fields inherited from interface org.ws4d.java.configuration.PropertiesHandler
FALSE, TRUE
 
Method Summary
 void finishedSection(int depth)
          This method indicates the PropertiesHandler, that the last section with the given depth has been read completely.
 int getAttachmentStorePolicy()
           
static AttachmentProperties getInstance()
          Returns instance of the attachment properties handler.
 int getMaxAttachmentSize()
           
 int getMaxMemBufferSize()
           
 int getReadBufferSize()
           
 java.lang.String getStorePath()
           
 int getStreamBufferSize()
           
 Iterator getStreamingMediaTypes()
           
 void setAttachmentStorePolicy(int attachmentStorePolicy)
           
 void setMaxAttachmentSize(int maxAttachmentSize)
           
 void setMaxMemBufferSize(int maxMemBufferSize)
           
 void setProperties(PropertyHeader header, Property property)
           
 void setReadBufferSize(int readBufferSize)
           
 void setStorePath(java.lang.String storePath)
           
 void setStreamingMediaTypes(DataStructure streamingMediaTypes)
           
 void setStremBufferSize(int streamBufferSize)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_ATTACHMENT_STORE_POLICY

public static final java.lang.String PROP_ATTACHMENT_STORE_POLICY
Attachment store policy in use
Default: AttachmentStore.POLICY_MEM_BUFFER

See Also:
Constant Field Values

PROP_MAX_ATTACHMENT_SIZE

public static final java.lang.String PROP_MAX_ATTACHMENT_SIZE
Maximum attachment size in bytes to accept
Default: 16777216

See Also:
Constant Field Values

PROP_MAX_MEM_BUFFER_SIZE

public static final java.lang.String PROP_MAX_MEM_BUFFER_SIZE
Maximum size in bytes for which attachment raw data can be kept into memory when using AttachmentStore.POLICY_MEM_BUFFER. MUST be less than or equal to PROP_MAX_ATTACHMENT_SIZE.
Default: 65536

See Also:
Constant Field Values

PROP_STORE_PATH

public static final java.lang.String PROP_STORE_PATH
Path to the file system location where temporary attachment files should be stored.
Default: attachment_store

See Also:
Constant Field Values

PROP_READ_BUFFER_SIZE

public static final java.lang.String PROP_READ_BUFFER_SIZE
Size of buffer to allocate when reading in attachments from a network or file stream.
Default: 8192

See Also:
Constant Field Values

PROP_STREAM_BUFFER_SIZE

public static final java.lang.String PROP_STREAM_BUFFER_SIZE
Size of buffer to allocate when reading in attachments with streaming support, see InputStreamAttachment and AttachmentStore.getStreamingMediaTypes().
Default: 128

See Also:
Constant Field Values

PROP_STREAMING_MEDIA_TYPES

public static final java.lang.String PROP_STREAMING_MEDIA_TYPES
MIME types to stream when sending as attachments.
Default: none

See Also:
Constant Field Values
Method Detail

getInstance

public static AttachmentProperties getInstance()
Returns instance of the attachment properties handler.

Returns:
the singleton instance of the attachment properties

setProperties

public void setProperties(PropertyHeader header,
                          Property property)
Specified by:
setProperties in interface PropertiesHandler
Parameters:
header - header of section
property - property within section

finishedSection

public void finishedSection(int depth)
Description copied from interface: PropertiesHandler
This method indicates the PropertiesHandler, that the last section with the given depth has been read completely.

Specified by:
finishedSection in interface PropertiesHandler
Parameters:
depth - depth of section.

getAttachmentStorePolicy

public int getAttachmentStorePolicy()
Returns:
the attachmentStorePolicy

setAttachmentStorePolicy

public void setAttachmentStorePolicy(int attachmentStorePolicy)
Parameters:
attachmentStorePolicy - the attachmentStorePolicy to set

getMaxAttachmentSize

public int getMaxAttachmentSize()
Returns:
the maxAttachmentSize

setMaxAttachmentSize

public void setMaxAttachmentSize(int maxAttachmentSize)
Parameters:
maxAttachmentSize - the maxAttachmentSize to set

getMaxMemBufferSize

public int getMaxMemBufferSize()
Returns:
the maxMemBufferSize

setMaxMemBufferSize

public void setMaxMemBufferSize(int maxMemBufferSize)
Parameters:
maxMemBufferSize - the maxMemBufferSize to set

getStorePath

public java.lang.String getStorePath()
Returns:
the storePath

setStorePath

public void setStorePath(java.lang.String storePath)
Parameters:
storePath - the storePath to set

getReadBufferSize

public int getReadBufferSize()
Returns:
the readBufferSize

setReadBufferSize

public void setReadBufferSize(int readBufferSize)
Parameters:
readBufferSize - the readBufferSize to set

getStreamBufferSize

public int getStreamBufferSize()
Returns:
the streamBufferSize

setStremBufferSize

public void setStremBufferSize(int streamBufferSize)
Parameters:
streamBufferSize - the streamBufferSize to set

getStreamingMediaTypes

public Iterator getStreamingMediaTypes()
Returns:
the streamingMediaTypes

setStreamingMediaTypes

public void setStreamingMediaTypes(DataStructure streamingMediaTypes)
Parameters:
streamingMediaTypes - the streamingMediaTypes to set