com.pcbsys.nirvana.client.nConsumeEventCompressWriter Class Reference

This is a helper class and enables clients to compress events simply prior to them being published to the actual store. More...

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

Public Member Functions

 nConsumeEventCompressWriter (nAbstractChannel store) throws nIllegalArgumentException
 Constructs a new nConsumeEventCompressWriter using the nAbstractChannel supplied. More...
 
 nConsumeEventCompressWriter (nEventPublisher publisher) throws nIllegalArgumentException
 Constructs a new nConsumeEventCompressWriter using the nEventPublisher supplied. More...
 
void publish (nConsumeEvent evt) throws nTransactionException, nSessionPausedException, nSessionNotConnectedException, nSecurityException, nRequestTimedOutException, nUnexpectedResponseException, nChannelNotFoundException, nIllegalArgumentException, nMaxBufferSizeExceededException
 Publishs the event evt but will compress the events data prior to publishing it to the server. More...
 

Detailed Description

This is a helper class and enables clients to compress events simply prior to them being published to the actual store.

To uncompress the events use the nConsumeEventCompressReader.

See Also
nConsumeEventCompressReader

Constructor & Destructor Documentation

com.pcbsys.nirvana.client.nConsumeEventCompressWriter.nConsumeEventCompressWriter ( nAbstractChannel  store) throws nIllegalArgumentException

Constructs a new nConsumeEventCompressWriter using the nAbstractChannel supplied.

Will compress any event sent via the publish call to the nAbstractChannel, this could be a queue or a channel.

Parameters
storethe channel / queue on which the writer will be used
Exceptions
nIllegalArgumentExceptionif the channel / queue is null
com.pcbsys.nirvana.client.nConsumeEventCompressWriter.nConsumeEventCompressWriter ( nEventPublisher  publisher) throws nIllegalArgumentException

Constructs a new nConsumeEventCompressWriter using the nEventPublisher supplied.

Will compress any event sent via the publish call to the nEventPublisher, this allows the nEventPublisher to be stacked, so that one nEventPublisher can call another before the event is sent to the nAbstractChannel

Parameters
publisherthe event publisher used by this compress writer
Exceptions
nIllegalArgumentExceptionif the publisher is null

Member Function Documentation

Publishs the event evt but will compress the events data prior to publishing it to the server.

If the resultant compressed byte[] is larger then the original then no compression will be done.

Parameters
evtthe event to compress and publish

Implements com.pcbsys.nirvana.client.nEventPublisher.