cgl.narada.matching.tagvalue
Class MEvent

java.lang.Object
  extended by cgl.narada.matching.tagvalue.MEvent
All Implemented Interfaces:
MatchingDebugFlags

public class MEvent
extends Object
implements MatchingDebugFlags

The event class which we use to perform matching on the profile graph constructed using the general matching algorithm.


Field Summary
 
Fields inherited from interface cgl.narada.matching.tagvalue.MatchingDebugFlags
EdgeAttributes_Debug, EventID_Debug, Matching_Debug, MatchingTreeEdge_Debug, MatchingTreeNode_Debug, MEvent_Debug, Predicate_Debug
 
Constructor Summary
MEvent(byte[] eventBytes)
          This method serves to unmarshall an event stream received over the link.
MEvent(String eventString)
          This MEvent constructor is used only by the JmsEventRoutingProtocol
MEvent(String eventString, int messageSize)
          The MEvent constructor.
 
Method Summary
 byte[] getBytes()
          This method returns the MEvent as a stream of bytes, the unmarshalling counterpart to this marshalling scheme is contained within one of the MEvent constructors
 int getMessageSize()
           
 String getNextTag()
          This returns the next tag, that is contained in the pairs associated with the event.
 String getTagValue(String tag)
          This method returns the value associated with a tag
 long getTimeStamp()
          This method returns the timestamp associated with the event
static void main(String[] args)
           
 void resetLocalPointer()
           
 void setTimeStamp(long timeStamp)
           
 String toString()
          Provides a string representation of the event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MEvent

public MEvent(String eventString,
              int messageSize)
The MEvent constructor.

Parameters:
eventString - The event string that we use to construct the String.
messageSize - This fixes the size of the message, by padding extra bytes.

MEvent

public MEvent(String eventString)
This MEvent constructor is used only by the JmsEventRoutingProtocol

Parameters:
eventString - The event string that we use to construct the String.

MEvent

public MEvent(byte[] eventBytes)
This method serves to unmarshall an event stream received over the link. The corresponding marshalling method for the event is contained within the getBytes() method.

Parameters:
eventBytes - The marshalled stream of event bytes that are received over a link.
Method Detail

getTimeStamp

public long getTimeStamp()
This method returns the timestamp associated with the event

Returns:
The timeStamp

setTimeStamp

public void setTimeStamp(long timeStamp)

getMessageSize

public int getMessageSize()

resetLocalPointer

public void resetLocalPointer()

getTagValue

public String getTagValue(String tag)
This method returns the value associated with a tag

Parameters:
tag - The tag for which we are seeking a value.

getNextTag

public String getNextTag()
This returns the next tag, that is contained in the pairs associated with the event.

Returns:
The next tag in the tag-value sequence

getBytes

public byte[] getBytes()
This method returns the MEvent as a stream of bytes, the unmarshalling counterpart to this marshalling scheme is contained within one of the MEvent constructors

Returns:
The byte stream representation of the MEvent

toString

public String toString()
Provides a string representation of the event.

Overrides:
toString in class Object
Returns:
String representation of the event

main

public static void main(String[] args)


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