com.pcbsys.nirvana.client.nConsumeEventFragmentWriter Class Reference

Provides a channel / queue wrapper as well as an nEventPublisher implementation that automatically fragments published events larger than a specified byte size into smaller event fragments. More...

Public Member Functions

 nConsumeEventFragmentWriter (nAbstractChannel store, int maxSize)
 Construct a writer where the events are written directly to the nAbstractChannel supplied. More...
 
 nConsumeEventFragmentWriter (nEventPublisher pub, int maxSize)
 Constructs a write where events are written to the next nEventPublisher. More...
 
void publish (nConsumeEvent evt)
 Publishes an nConsumeEvent to the nEventPublisher or nAbstractChannel after it maybe fragemented. More...
 

Detailed Description

Provides a channel / queue wrapper as well as an nEventPublisher implementation that automatically fragments published events larger than a specified byte size into smaller event fragments.

Constructor & Destructor Documentation

com.pcbsys.nirvana.client.nConsumeEventFragmentWriter.nConsumeEventFragmentWriter ( nAbstractChannel  store,
int  maxSize 
)

Construct a writer where the events are written directly to the nAbstractChannel supplied.

Parameters
storethe channel / queue onto which the fragmented events will be written
maxSizethe maximum size of each fragmented event in bytes
Exceptions
nIllegalArgumentExceptionif maxSize < 0 or store is null
com.pcbsys.nirvana.client.nConsumeEventFragmentWriter.nConsumeEventFragmentWriter ( nEventPublisher  pub,
int  maxSize 
)

Constructs a write where events are written to the next nEventPublisher.

Parameters
pub- the event publisher to use in this fragment writer
maxSizethe maximum size of each event fragment.
Exceptions
nIllegalArgumentExceptionif maxSize < 0 or pub is null

Member Function Documentation

void com.pcbsys.nirvana.client.nConsumeEventFragmentWriter.publish ( nConsumeEvent  evt)