MADARA  3.4.1
madara::filters::JavaBufferFilter Class Reference

Filters a buffer in Java. More...

#include <JavaBufferFilter.h>

Inheritance diagram for madara::filters::JavaBufferFilter:
madara::filters::BufferFilter

Public Member Functions

 JavaBufferFilter (logger::Logger &logger, jobject obj)
 Constructor. More...
 
virtual ~JavaBufferFilter ()
 Destructor. More...
 
virtual int decode (char *source, int size, int max_size) const
 Decodes the buffer in place using AES encryption. More...
 
virtual int encode (char *source, int size, int max_size) const
 Encodes the buffer in place using AES encryption. More...
 
virtual std::string get_id (void)
 Gets the id of the filter. More...
 
virtual uint32_t get_version (void)
 Gets the version of the filter. More...
 

Private Attributes

jclass class_
 the class of the Java object obj_ More...
 
logger::Loggerlogger_
 a logger More...
 
jobject obj_
 

Detailed Description

Filters a buffer in Java.

Definition at line 32 of file JavaBufferFilter.h.

Constructor & Destructor Documentation

◆ JavaBufferFilter()

madara::filters::JavaBufferFilter::JavaBufferFilter ( logger::Logger logger,
jobject  obj 
)

Constructor.

Definition at line 11 of file JavaBufferFilter.cpp.

◆ ~JavaBufferFilter()

madara::filters::JavaBufferFilter::~JavaBufferFilter ( )
virtual

Destructor.

Definition at line 60 of file JavaBufferFilter.cpp.

Member Function Documentation

◆ decode()

int madara::filters::JavaBufferFilter::decode ( char *  source,
int  size,
int  max_size 
) const
virtual

Decodes the buffer in place using AES encryption.

Parameters
sourcethe source and destination buffer
sizethe amount of data in the buffer in bytes
max_sizethe amount of bytes the buffer can hold
Returns
the new size after decoding

Implements madara::filters::BufferFilter.

Definition at line 130 of file JavaBufferFilter.cpp.

◆ encode()

int madara::filters::JavaBufferFilter::encode ( char *  source,
int  size,
int  max_size 
) const
virtual

Encodes the buffer in place using AES encryption.

Parameters
sourcethe source and destination buffer
sizethe amount of data in the buffer in bytes
max_sizethe amount of bytes the buffer can hold
Returns
the new size after encoding

Implements madara::filters::BufferFilter.

Definition at line 74 of file JavaBufferFilter.cpp.

◆ get_id()

std::string madara::filters::JavaBufferFilter::get_id ( void  )
virtual

Gets the id of the filter.

This is used in the serialization process for transports and checkpoints to identify which filter is used.

Implements madara::filters::BufferFilter.

Definition at line 186 of file JavaBufferFilter.cpp.

◆ get_version()

uint32_t madara::filters::JavaBufferFilter::get_version ( void  )
virtual

Gets the version of the filter.

See also
madara::utility::get_uint_version for one way to get this from a string version

Implements madara::filters::BufferFilter.

Definition at line 191 of file JavaBufferFilter.cpp.

Member Data Documentation

◆ class_

jclass madara::filters::JavaBufferFilter::class_
private

the class of the Java object obj_

Definition at line 80 of file JavaBufferFilter.h.

◆ logger_

logger::Logger* madara::filters::JavaBufferFilter::logger_
private

a logger

Definition at line 83 of file JavaBufferFilter.h.

◆ obj_

jobject madara::filters::JavaBufferFilter::obj_
private

Definition at line 77 of file JavaBufferFilter.h.


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