org.alfresco.deployment.transformers
Class CompressionTransformer
java.lang.Object
org.alfresco.deployment.transformers.CompressionTransformer
- All Implemented Interfaces:
- DeploymentTransportInputFilter, DeploymentTransportOutputFilter
public class CompressionTransformer
- extends java.lang.Object
- implements DeploymentTransportInputFilter, DeploymentTransportOutputFilter
Sample payload transformer for remote communication with the File System Receiver (FSR)
Compresses the outgoing stream using ZLIB
Uncompresses the incoming stream using ZLIB
Method Summary |
java.io.InputStream |
addFilter(java.io.InputStream in,
java.lang.String path,
java.lang.String mimeType,
java.lang.String encoding)
Add a filter to transform the payload of a deployment. |
java.io.OutputStream |
addFilter(java.io.OutputStream out,
java.lang.String path,
java.lang.String mimeType,
java.lang.String encoding)
Add a filter to transform the payload of a deployment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompressionTransformer
public CompressionTransformer()
addFilter
public java.io.OutputStream addFilter(java.io.OutputStream out,
java.lang.String path,
java.lang.String mimeType,
java.lang.String encoding)
- Description copied from interface:
DeploymentTransportOutputFilter
- Add a filter to transform the payload of a deployment.
The outputStream is the outgoing payload from WCM to the FSR.
If this transformation is not required then simply return out. Do not return null.
- Specified by:
addFilter
in interface DeploymentTransportOutputFilter
- Parameters:
out
- the output stream being filtered.path
- the path of the filemimeType
- the encoding of the fileencoding
- the mimeType of the file
- Returns:
- the filtered output stream
addFilter
public java.io.InputStream addFilter(java.io.InputStream in,
java.lang.String path,
java.lang.String mimeType,
java.lang.String encoding)
- Description copied from interface:
DeploymentTransportInputFilter
- Add a filter to transform the payload of a deployment.
The inputStream is received on the File System Receiver
If this transformation is not required then simply return in. Do not return null.
- Specified by:
addFilter
in interface DeploymentTransportInputFilter
- Parameters:
in
- the input stream being filtered.path
- the path of the filemimeType
- the encoding of the fileencoding
- the mimeType of the file
- Returns:
- the filtered input stream
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.