endurox-java
Public Member Functions | Protected Member Functions | List of all members
org.endurox.TypedBuffer Class Reference

Public Member Functions

native void tprealloc (long size)
 
 TypedBuffer (AtmiCtx ctx, boolean doFinalize, long cPtr, long len)
 
void setAtmiCtx (AtmiCtx ctx)
 
void cleanup ()
 
void setDoFinalize (boolean b)
 
native TpTypesResult tptypes ()
 

Protected Member Functions

void finalize () throws Throwable
 

Detailed Description

This is data type buffer for XATMI IPC. Note that only one instance of the buffer may hold the destructor for C counter parts. Some buffers (received by service call) may not be even associated by destructor, as those are dellocated by XATMI sub-system.

Constructor & Destructor Documentation

◆ TypedBuffer()

org.endurox.TypedBuffer.TypedBuffer ( AtmiCtx  ctx,
boolean  doFinalize,
long  cPtr,
long  len 
)

Initialize ATMI Buffer Object

Parameters
ctx[in]ATMI Context allocated this method
doFinalize[in]Should
cPtr[in]C pointer to allocated block
len[in]Conditional buffer length

Member Function Documentation

◆ cleanup()

void org.endurox.TypedBuffer.cleanup ( )

Clean up the object (basically this is destructor) as we cannot relay on finalize() auto call of from the Garbage Collector. Thus we object goes out of the scope,

◆ finalize()

void org.endurox.TypedBuffer.finalize ( ) throws Throwable
protected

Finish of this ATMI buffer

◆ setAtmiCtx()

void org.endurox.TypedBuffer.setAtmiCtx ( AtmiCtx  ctx)

Change the owner ATMi Context, when buffer is passed from one context / thread to another

Exceptions
NullPointerExceptionctx is null
Parameters
ctxATMI Context

◆ setDoFinalize()

void org.endurox.TypedBuffer.setDoFinalize ( boolean  b)

Set the finalize flag

◆ tprealloc()

native void org.endurox.TypedBuffer.tprealloc ( long  size)

Reallocate ATMI buffer

Parameters
size[in]New buffer size
Exceptions
AtmiTPEOSExceptionOperating system exception occurred

◆ tptypes()

native TpTypesResult org.endurox.TypedBuffer.tptypes ( )

Get the buffer type description from middleware point of view

Returns
Type descriptor