cgl.narada.event.impl
Class NBEventImpl

java.lang.Object
  extended by cgl.narada.event.impl.NBEventImpl
All Implemented Interfaces:
NBEvent

public class NBEventImpl
extends Object
implements NBEvent

This is the basic template event within the NaradaBrokering system. This event includes among other things, information regarding a)The event's headers b)The event's content synopsis c)The content payload


Constructor Summary
NBEventImpl()
           
NBEventImpl(byte[] eventBytes)
           
 
Method Summary
 byte[] getBytes()
          Generates a byte stream representation of the event
 byte[] getContentPayload()
          Get the content Payload
 int getContentPayloadSize()
          Get the payload size
 Object getContentSynopsis()
          Retrieves the synopis associated with the content
 int getContentSynopsisType()
          Returns the type of the content synopsis
 String getContentType()
          Indicates the type of the content
 DistributionTraces getDistributionTraces()
          Gets the distribution Traces associated with the event
 EventHeaders getEventHeaders()
          Header information pertaining to the event
 EventProperties getEventProperties()
          EventProperties associated with the event
 int getEventType()
          Indicates the type of the event
 boolean hasDistributionTraces()
          Indicates if the event has distribution traces
 boolean hasEventHeaders()
          Indicates if this event has any event headers
 boolean hasEventProperties()
          Indicates if this event has any user-defined properties
static void main(String[] args)
          A utility method to test the NBEvent implementation
protected  void setContentPayload(byte[] payload)
          Set the payload
protected  void setContentSynopsisInfo(int contentSynopsisType, Object contentSynopsis)
          Set the content synopis information
protected  void setDistributionTraces(DistributionTraces distributionTraces)
          Set the dissemination traces
protected  void setEventHeaders(EventHeaders eventHeaders)
          Set the event headers
protected  void setEventType(int eventType)
          Sets the event type information
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NBEventImpl

public NBEventImpl()

NBEventImpl

public NBEventImpl(byte[] eventBytes)
Method Detail

setEventType

protected void setEventType(int eventType)
Sets the event type information


setContentSynopsisInfo

protected void setContentSynopsisInfo(int contentSynopsisType,
                                      Object contentSynopsis)
Set the content synopis information


setEventHeaders

protected void setEventHeaders(EventHeaders eventHeaders)
Set the event headers


setContentPayload

protected void setContentPayload(byte[] payload)
Set the payload


setDistributionTraces

protected void setDistributionTraces(DistributionTraces distributionTraces)
Set the dissemination traces


getEventType

public int getEventType()
Indicates the type of the event

Specified by:
getEventType in interface NBEvent

getContentType

public String getContentType()
Indicates the type of the content

Specified by:
getContentType in interface NBEvent

hasEventHeaders

public boolean hasEventHeaders()
Indicates if this event has any event headers

Specified by:
hasEventHeaders in interface NBEvent

getEventHeaders

public EventHeaders getEventHeaders()
Header information pertaining to the event

Specified by:
getEventHeaders in interface NBEvent

hasEventProperties

public boolean hasEventProperties()
Indicates if this event has any user-defined properties

Specified by:
hasEventProperties in interface NBEvent

getEventProperties

public EventProperties getEventProperties()
EventProperties associated with the event

Specified by:
getEventProperties in interface NBEvent

getContentSynopsisType

public int getContentSynopsisType()
Returns the type of the content synopsis

Specified by:
getContentSynopsisType in interface NBEvent

getContentSynopsis

public Object getContentSynopsis()
Retrieves the synopis associated with the content

Specified by:
getContentSynopsis in interface NBEvent

getContentPayloadSize

public int getContentPayloadSize()
Get the payload size

Specified by:
getContentPayloadSize in interface NBEvent

getContentPayload

public byte[] getContentPayload()
Get the content Payload

Specified by:
getContentPayload in interface NBEvent

hasDistributionTraces

public boolean hasDistributionTraces()
Indicates if the event has distribution traces

Specified by:
hasDistributionTraces in interface NBEvent

getDistributionTraces

public DistributionTraces getDistributionTraces()
Gets the distribution Traces associated with the event

Specified by:
getDistributionTraces in interface NBEvent

getBytes

public byte[] getBytes()
Generates a byte stream representation of the event

Specified by:
getBytes in interface NBEvent

main

public static void main(String[] args)
A utility method to test the NBEvent implementation



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