org.jacorb.notification
Class AnyMessage

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

public class AnyMessage
extends AbstractMessage

Version:
$Id: AnyMessage.java,v 1.16 2005/11/11 19:35:01 alphonse.bendt Exp $
Author:
Alphonse Bendt

Field Summary
protected  Any anyValue_
          the wrapped value
static int DEFAULT_PRIORITY
           
protected  StructuredEvent structuredEventValue_
          the wrapped Any converted to a StructuredEvent
static java.lang.String TYPE_NAME
           
 
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
AnyMessage()
           
 
Method Summary
 void doReset()
           
 EvaluationResult extractFilterableData(EvaluationContext context, ComponentName root, java.lang.String v)
           
 EvaluationResult extractVariableHeader(EvaluationContext context, ComponentName root, java.lang.String v)
           
 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 setAny(Any any)
           
 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
 

Field Detail

TYPE_NAME

public static final java.lang.String TYPE_NAME
See Also:
Constant Field Values

DEFAULT_PRIORITY

public static final int DEFAULT_PRIORITY
See Also:
Constant Field Values

anyValue_

protected Any anyValue_
the wrapped value


structuredEventValue_

protected StructuredEvent structuredEventValue_
the wrapped Any converted to a StructuredEvent

Constructor Detail

AnyMessage

public AnyMessage()
Method Detail

setAny

public void setAny(Any any)

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

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.

toStructuredEvent

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

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

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 v)
                                       throws EvaluationException
Specified by:
extractFilterableData in class AbstractMessage
Throws:
EvaluationException

extractVariableHeader

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

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

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

toString

public java.lang.String toString()