atscppapi  1.0.9
C++ wrapper for Apache Traffic Server API
 All Classes Files Functions Enumerations Enumerator Macros
Public Member Functions | List of all members
atscppapi::transformations::GzipInflateTransformation Class Reference

A TransformationPlugin to easily add gzip inflate to your TransformationPlugin chain. More...

#include "GzipInflateTransformation.h"

Inheritance diagram for atscppapi::transformations::GzipInflateTransformation:
atscppapi::TransformationPlugin atscppapi::TransactionPlugin atscppapi::Plugin

Public Member Functions

 GzipInflateTransformation (Transaction &transaction, TransformationPlugin::Type type)
 
void consume (const std::string &)
 
void handleInputComplete ()
 
- Public Member Functions inherited from atscppapi::TransformationPlugin
virtual ~TransformationPlugin ()
 
- Public Member Functions inherited from atscppapi::TransactionPlugin
void registerHook (Plugin::HookType hook_type)
 
- Public Member Functions inherited from atscppapi::Plugin
virtual void handleReadRequestHeadersPreRemap (Transaction &transaction)
 
virtual void handleReadRequestHeadersPostRemap (Transaction &transaction)
 
virtual void handleSendRequestHeaders (Transaction &transaction)
 
virtual void handleReadResponseHeaders (Transaction &transaction)
 
virtual void handleSendResponseHeaders (Transaction &transaction)
 
virtual void handleOsDns (Transaction &transaction)
 

Additional Inherited Members

- Public Types inherited from atscppapi::TransformationPlugin
enum  Type { REQUEST_TRANSFORMATION = 0, RESPONSE_TRANSFORMATION }
 
- Protected Member Functions inherited from atscppapi::TransformationPlugin
size_t produce (const std::string &)
 
size_t setOutputComplete ()
 
 TransformationPlugin (Transaction &transaction, Type type)
 

Detailed Description

A TransformationPlugin to easily add gzip inflate to your TransformationPlugin chain.

The GzipInflateTransformation is a helper transformation that can be used to easily decompress gzipped content. For a full example of GzipInflateTransformation and GzipDeflateTransformation see examples/gzip_transformation/.

Note
GzipDeflateTransformation DOES NOT set or check Content-Encoding headers, it is the users responsibility to set any applicable headers and check that the content is acctually gzipped by checking the Content-Encoding header before creating a GzipInflateTransformation, see examples/gzip_transformation/ for a full example.
See Also
GzipDeflateTransformation

Constructor & Destructor Documentation

GzipInflateTransformation::GzipInflateTransformation ( Transaction transaction,
TransformationPlugin::Type  type 
)

A full example of how to use GzipInflateTransformation and GzipDeflateTransformation is available in examples/gzip_tranformation/

Parameters
transactionAs with any TransformationPlugin you must pass in the transaction
typebecause the GzipInflateTransformation can be used with both requests and responses you must specify the Type.
See Also
TransformationPlugin::Type

Member Function Documentation

void GzipInflateTransformation::consume ( const std::string &  )
virtual

Any TransformationPlugin must implement consume(), this method will take content from the transformation chain and gzip decompress it.

Parameters
datathe input data to decompress

Implements atscppapi::TransformationPlugin.

void GzipInflateTransformation::handleInputComplete ( )
virtual

Any TransformationPlugin must implement handleInputComplete(), this method will finalize the gzip decompression.

Implements atscppapi::TransformationPlugin.


The documentation for this class was generated from the following files: