com.pcbsys.nirvana.client.nConsumeEventFragmentWriter Class Reference

This class will break up events when the data portion of the event is greater then the threshold specified. More...

Inheritance diagram for com.pcbsys.nirvana.client.nConsumeEventFragmentWriter:
com.pcbsys.nirvana.client.nEventPublisher

Public Member Functions

 nConsumeEventFragmentWriter (nAbstractChannel store, int maxSize) throws nIllegalArgumentException
 Construct a writer where the events are written directly to the nAbstractChannel supplied. More...
 
 nConsumeEventFragmentWriter (nEventPublisher pub, int maxSize) throws nIllegalArgumentException
 Constructs a write where events are written to the next nEventPublisher. More...
 
void publish (nConsumeEvent evt) throws nTransactionException, nSessionPausedException, nSessionNotConnectedException, nSecurityException, nRequestTimedOutException, nUnexpectedResponseException, nChannelNotFoundException, nIllegalArgumentException, nMaxBufferSizeExceededException
 Publishes an nConsumeEvent to the nEventPublisher or nAbstractChannel after it maybe fragemented. More...
 

Detailed Description

This class will break up events when the data portion of the event is greater then the threshold specified.

When events are published via this class, if the data is greater then the maxSize specified in the constructors, then the event is split across multiple events where each events data is equal or less then the maxSize specified.

Constructor & Destructor Documentation

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

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 
) throws nIllegalArgumentException

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

Publishes an nConsumeEvent to the nEventPublisher or nAbstractChannel after it maybe fragemented.

Parameters
evtthe event to fragment

Implements com.pcbsys.nirvana.client.nEventPublisher.