Package com.adaptris.filesystem
Class ZipService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.filesystem.ZipService
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator,Service,StateManagedComponent
@ComponentProfile(summary="Zip the contents of the message", tag="service,zip") public class ZipService extends ServiceImpZip a directory and put the compressed data in the payload.In the adapter configuration file this class is aliased as zip-service which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description ZipService()ZipService(java.lang.String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseService()voiddoService(AdaptrisMessage msg)java.lang.StringgetDirectoryPath()Get the directory to zip.protected voidinitService()voidprepare()voidsetDirectoryPath(java.lang.String directoryPath)Set the directory to zip.-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
-
-
-
Method Detail
-
getDirectoryPath
public java.lang.String getDirectoryPath()
Get the directory to zip.- Returns:
- The directory to zip.
-
setDirectoryPath
public void setDirectoryPath(java.lang.String directoryPath)
Set the directory to zip.- Parameters:
directoryPath- The directory to zip.
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
- Throws:
ServiceException
-
prepare
public void prepare() throws CoreException- Throws:
CoreException
-
initService
protected void initService() throws CoreException- Specified by:
initServicein classServiceImp- Throws:
CoreException
-
closeService
protected void closeService()
- Specified by:
closeServicein classServiceImp
-
-