cgl.narada.event.impl
Class NBEventGenerator

java.lang.Object
  extended by cgl.narada.event.impl.NBEventGenerator

public class NBEventGenerator
extends Object

This is the class which is responsible for the generation of NBEvents.


Constructor Summary
NBEventGenerator()
           
 
Method Summary
 NBEvent generateEvent(int templateId, int source, boolean suppressDistToSource, boolean timestamp, boolean useHRtimestamp, boolean useNtpTimestamp, int timeToLive, boolean generateId, boolean isCorrelated, EventID correlationId, boolean persistent, int priority, int contentSynopsisType, Object contentSynopsis, byte[] contentPayload)
           
 NBEvent getCoalescedEvent(NBEvent fragmentEvent, byte[] coalescedPayload)
          This method is used to create a coalesced event from the information supplied by the coalescing service.
 NBEvent getFragmentedEvent(NBEvent nbEvent, String filename, long originalLength, byte[] fragmentedPayload, int fragmentNumber, int totalNumberOfFragments, long fragmentationEpoch)
          This method is used to create a fragmented event from the information supplied by the fragmentation service.
static void setEventType(NBEvent nbEvent, int eventType)
           
 void setPayload(NBEvent nbEvent, byte[] newPayload)
           
static NBEvent unmarshallEvent(byte[] nbEventBytes)
           
 void updateAssertionsInformation(NBEvent nbEvent, String assertions)
          This method is used to update security information for an event
 void updateCompressionInformation(NBEvent nbEvent, String compressionAlgo, long originalPayloadLength, boolean isPayloadCompressionFinalStep, byte[] compressedPayload)
          This method is used to update compression information for an event
 NBEvent updateContentSynopsisInfo(NBEvent nbEvent, int contentSynopsisType, Object contentSynopsis)
           
static void updateDistributionTraces(NBEvent nbEvent, DistributionTraces traces)
           
 void updateEncryptedPayloadInformation(NBEvent nbEvent, byte[] securePayload, byte[] cipherIV, String cipherMode, String cipherPaddingScheme)
           
static void updateIntegrityInformation(NBEvent nbEvent, String digestScheme, byte[] messageDigest)
          This method is used to update integrity information for an event
 void updateSignatureInformation(NBEvent nbEvent, String signatureAlgorithm, byte[] signature)
           
 void updateSlicedInformation(NBEvent nbEvent, int sliceStartingPoint, int sliceEndingPoint)
          This method is used to update slice information for an event
 NBEvent updateTimestampInfo(NBEvent nbEvent, long publishTimestamp)
           
 void updateWithDecompressedPayload(NBEvent nbEvent, byte[] decompressedPayload)
           
 void updateWithDecryptedPayload(NBEvent nbEvent, byte[] decryptedPayload)
           
 void updateWithEncryptedPayload(NBEvent nbEvent, byte[] encryptedPayload)
           
static void validateIntegrityInformation(NBEvent nbEvent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NBEventGenerator

public NBEventGenerator()
Method Detail

updateTimestampInfo

public NBEvent updateTimestampInfo(NBEvent nbEvent,
                                   long publishTimestamp)

updateContentSynopsisInfo

public NBEvent updateContentSynopsisInfo(NBEvent nbEvent,
                                         int contentSynopsisType,
                                         Object contentSynopsis)

generateEvent

public NBEvent generateEvent(int templateId,
                             int source,
                             boolean suppressDistToSource,
                             boolean timestamp,
                             boolean useHRtimestamp,
                             boolean useNtpTimestamp,
                             int timeToLive,
                             boolean generateId,
                             boolean isCorrelated,
                             EventID correlationId,
                             boolean persistent,
                             int priority,
                             int contentSynopsisType,
                             Object contentSynopsis,
                             byte[] contentPayload)
                      throws ServiceException
Throws:
ServiceException

updateEncryptedPayloadInformation

public void updateEncryptedPayloadInformation(NBEvent nbEvent,
                                              byte[] securePayload,
                                              byte[] cipherIV,
                                              String cipherMode,
                                              String cipherPaddingScheme)

updateSignatureInformation

public void updateSignatureInformation(NBEvent nbEvent,
                                       String signatureAlgorithm,
                                       byte[] signature)

updateAssertionsInformation

public void updateAssertionsInformation(NBEvent nbEvent,
                                        String assertions)
This method is used to update security information for an event


updateIntegrityInformation

public static void updateIntegrityInformation(NBEvent nbEvent,
                                              String digestScheme,
                                              byte[] messageDigest)
This method is used to update integrity information for an event


getFragmentedEvent

public NBEvent getFragmentedEvent(NBEvent nbEvent,
                                  String filename,
                                  long originalLength,
                                  byte[] fragmentedPayload,
                                  int fragmentNumber,
                                  int totalNumberOfFragments,
                                  long fragmentationEpoch)
                           throws ServiceException
This method is used to create a fragmented event from the information supplied by the fragmentation service.

Throws:
ServiceException

getCoalescedEvent

public NBEvent getCoalescedEvent(NBEvent fragmentEvent,
                                 byte[] coalescedPayload)
                          throws ServiceException
This method is used to create a coalesced event from the information supplied by the coalescing service.

Throws:
ServiceException

updateSlicedInformation

public void updateSlicedInformation(NBEvent nbEvent,
                                    int sliceStartingPoint,
                                    int sliceEndingPoint)
This method is used to update slice information for an event


updateCompressionInformation

public void updateCompressionInformation(NBEvent nbEvent,
                                         String compressionAlgo,
                                         long originalPayloadLength,
                                         boolean isPayloadCompressionFinalStep,
                                         byte[] compressedPayload)
This method is used to update compression information for an event


updateWithDecompressedPayload

public void updateWithDecompressedPayload(NBEvent nbEvent,
                                          byte[] decompressedPayload)

updateWithEncryptedPayload

public void updateWithEncryptedPayload(NBEvent nbEvent,
                                       byte[] encryptedPayload)

updateWithDecryptedPayload

public void updateWithDecryptedPayload(NBEvent nbEvent,
                                       byte[] decryptedPayload)

setPayload

public void setPayload(NBEvent nbEvent,
                       byte[] newPayload)

updateDistributionTraces

public static void updateDistributionTraces(NBEvent nbEvent,
                                            DistributionTraces traces)

setEventType

public static void setEventType(NBEvent nbEvent,
                                int eventType)

unmarshallEvent

public static NBEvent unmarshallEvent(byte[] nbEventBytes)

validateIntegrityInformation

public static void validateIntegrityInformation(NBEvent nbEvent)


For comments and suggestions please send e-mail to The NaradaBrokering Project