org.jacorb.notification
Class StructuredEventMessage

java.lang.Object
  extended byorg.jacorb.notification.util.AbstractPoolable
      extended byorg.jacorb.notification.AbstractMessage
          extended byorg.jacorb.notification.StructuredEventMessage
All Implemented Interfaces:
org.picocontainer.Disposable, Disposable

public class StructuredEventMessage
extends AbstractMessage

Adapts a StructuredEvent to the Message Interface.

Version:
$Id: StructuredEventMessage.java,v 1.22 2006/02/25 14:59:10 alphonse.bendt Exp $
Author:
Alphonse Bendt

Field Summary
 
Fields inherited from class org.jacorb.notification.AbstractMessage
consumerAdminFiltered_, proxyConsumerFiltered_, proxySupplierFiltered_, referenced_, supplierAdminFiltered_
 
Fields inherited from class org.jacorb.notification.util.AbstractPoolable
logger_
 
Constructor Summary
StructuredEventMessage()
           
 
Method Summary
 void doReset()
           
 EvaluationResult extractFilterableData(EvaluationContext context, ComponentName root, java.lang.String name)
           
 EvaluationResult extractVariableHeader(EvaluationContext context, ComponentName root, java.lang.String name)
           
 java.lang.String getConstraintKey()
          get the Constraint Key for this Event.
 int getPriority()
           
 long getStartTime()
           
 long getStopTime()
           
 long getTimeout()
           
 int getType()
          get the Type of this NotificationEvent.
 boolean hasStartTime()
           
 boolean hasStopTime()
           
 boolean hasTimeout()
           
 boolean match(Filter filter)
           
 boolean match(MappingFilter filter, AnyHolder value)
           
 void setStructuredEvent(StructuredEvent structuredEvent, boolean startTimeSupported, boolean stopTimeSupported)
           
 Any toAny()
          Access this NotificationEvent as Any.
 java.lang.String toString()
           
 StructuredEvent toStructuredEvent()
          Access this NotificationEvent as StructuredEvent.
 Property[] toTypedEvent()
          convert this message to a TypedEvent.
 
Methods inherited from class org.jacorb.notification.AbstractMessage
addReference, calcConstraintKey, extractValue, extractValue, getFilterStage, getHandle, getReceiveTimestamp, initReceiveTimestamp, match, removeReference, reset, setFilterStage
 
Methods inherited from class org.jacorb.notification.util.AbstractPoolable
dispose, setObjectPool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StructuredEventMessage

public StructuredEventMessage()
Method Detail

setStructuredEvent

public void setStructuredEvent(StructuredEvent structuredEvent,
                               boolean startTimeSupported,
                               boolean stopTimeSupported)

doReset

public void doReset()
Overrides:
doReset in class AbstractMessage

getType

public int getType()
Description copied from class: AbstractMessage
get the Type of this NotificationEvent. The value is one of Message.TYPE_ANY,Message.TYPE_STRUCTURED, or Message.TYPE_TYPED.

Specified by:
getType in class AbstractMessage
Returns:
the Type of this NotificationEvent.

toAny

public Any toAny()
Description copied from class: AbstractMessage
Access this NotificationEvent as Any.

Specified by:
toAny in class AbstractMessage
Returns:
an Any value

toStructuredEvent

public StructuredEvent toStructuredEvent()
Description copied from class: AbstractMessage
Access this NotificationEvent as StructuredEvent.

Specified by:
toStructuredEvent in class AbstractMessage
Returns:
a StructuredEvent value

toTypedEvent

public Property[] toTypedEvent()
                        throws NoTranslationException
Description copied from class: AbstractMessage
convert this message to a TypedEvent.

Specified by:
toTypedEvent in class AbstractMessage
Returns:
a sequence of name-value pairs.
Throws:
NoTranslationException - if the contents of the message cannot be translated into a TypedEvent.

getConstraintKey

public java.lang.String getConstraintKey()
Description copied from class: AbstractMessage
get the Constraint Key for this Event. The Constraint Key is used to fetch the Filter Constraints that must be evaluated for this Event. The Constraint Key consists of domain_name and type_name of the Event.

Specified by:
getConstraintKey in class AbstractMessage
Returns:
a String value

extractFilterableData

public EvaluationResult extractFilterableData(EvaluationContext context,
                                              ComponentName root,
                                              java.lang.String name)
                                       throws EvaluationException
Specified by:
extractFilterableData in class AbstractMessage
Throws:
EvaluationException

extractVariableHeader

public EvaluationResult extractVariableHeader(EvaluationContext context,
                                              ComponentName root,
                                              java.lang.String name)
                                       throws EvaluationException
Specified by:
extractVariableHeader in class AbstractMessage
Throws:
EvaluationException

hasStartTime

public boolean hasStartTime()
Specified by:
hasStartTime in class AbstractMessage

getStartTime

public long getStartTime()
Specified by:
getStartTime in class AbstractMessage

hasStopTime

public boolean hasStopTime()
Specified by:
hasStopTime in class AbstractMessage

getStopTime

public long getStopTime()
Specified by:
getStopTime in class AbstractMessage

hasTimeout

public boolean hasTimeout()
Specified by:
hasTimeout in class AbstractMessage

getTimeout

public long getTimeout()
Specified by:
getTimeout in class AbstractMessage

match

public boolean match(Filter filter)
              throws UnsupportedFilterableData
Specified by:
match in class AbstractMessage
Throws:
UnsupportedFilterableData

getPriority

public int getPriority()
Specified by:
getPriority in class AbstractMessage

match

public boolean match(MappingFilter filter,
                     AnyHolder value)
              throws UnsupportedFilterableData
Specified by:
match in class AbstractMessage
Throws:
UnsupportedFilterableData

toString

public java.lang.String toString()