org.jacorb.notification
Class AbstractMessage

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

public abstract class AbstractMessage
extends AbstractPoolable

Version:
$Id: AbstractMessage.java,v 1.30 2006/03/08 20:39:10 alphonse.bendt Exp $
Author:
Alphonse Bendt

Field Summary
protected  boolean consumerAdminFiltered_
           
protected  boolean proxyConsumerFiltered_
           
protected  boolean proxySupplierFiltered_
           
protected  int referenced_
          Internal Reference Counter.
protected  boolean supplierAdminFiltered_
           
 
Fields inherited from class org.jacorb.notification.util.AbstractPoolable
logger_
 
Constructor Summary
AbstractMessage()
           
 
Method Summary
 void addReference()
          Add a reference on this NotificationEvent.
static java.lang.String calcConstraintKey(java.lang.String domain_name, java.lang.String type_name)
          Provide a Uniform Mapping from domain_name and type_name to a Key that can be used to put EventTypes into a Map. if (d1 == d2) AND (t1 == t2) => calcConstraintKey(d1, t1) == calcConstraintKey(d2, t2).
protected  void doReset()
           
abstract  EvaluationResult extractFilterableData(EvaluationContext context, ComponentName componentRootNode, java.lang.String variable)
           
 EvaluationResult extractValue(EvaluationContext evaluationContext, ComponentName componentRootNode)
           
 EvaluationResult extractValue(EvaluationContext context, ComponentName componentRootNode, RuntimeVariable runtimeVariable)
           
abstract  EvaluationResult extractVariableHeader(EvaluationContext context, ComponentName componentRootNode, java.lang.String variable)
           
abstract  java.lang.String getConstraintKey()
          get the Constraint Key for this Event.
 FilterStage getFilterStage()
           
 Message getHandle()
           
abstract  int getPriority()
           
 long getReceiveTimestamp()
           
abstract  long getStartTime()
           
abstract  long getStopTime()
           
abstract  long getTimeout()
           
abstract  int getType()
          get the Type of this NotificationEvent.
abstract  boolean hasStartTime()
           
abstract  boolean hasStopTime()
           
abstract  boolean hasTimeout()
           
 void initReceiveTimestamp()
           
abstract  boolean match(Filter filter)
           
 boolean match(FilterStage filterStage)
           
abstract  boolean match(MappingFilter filter, AnyHolder value)
           
protected  void removeReference()
          release this NotificationEvent.
 void reset()
          Reset the Object to an initial state.
 void setFilterStage(FilterStage node)
           
abstract  Any toAny()
          Access this NotificationEvent as Any.
abstract  StructuredEvent toStructuredEvent()
          Access this NotificationEvent as StructuredEvent.
abstract  Property[] toTypedEvent()
          convert this message to a TypedEvent.
 
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, toString, wait, wait, wait
 

Field Detail

proxyConsumerFiltered_

protected boolean proxyConsumerFiltered_

supplierAdminFiltered_

protected boolean supplierAdminFiltered_

consumerAdminFiltered_

protected boolean consumerAdminFiltered_

proxySupplierFiltered_

protected boolean proxySupplierFiltered_

referenced_

protected int referenced_
Internal Reference Counter.

Constructor Detail

AbstractMessage

public AbstractMessage()
Method Detail

getConstraintKey

public abstract java.lang.String getConstraintKey()
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.

Returns:
a String value

getReceiveTimestamp

public long getReceiveTimestamp()

toAny

public abstract Any toAny()
Access this NotificationEvent as Any.

Returns:
an Any value

toTypedEvent

public abstract Property[] toTypedEvent()
                                 throws NoTranslationException
convert this message to a TypedEvent.

Returns:
a sequence of name-value pairs.
Throws:
NoTranslationException - if the contents of the message cannot be translated into a TypedEvent.

toStructuredEvent

public abstract StructuredEvent toStructuredEvent()
Access this NotificationEvent as StructuredEvent.

Returns:
a StructuredEvent value

getType

public abstract int getType()
get the Type of this NotificationEvent. The value is one of Message.TYPE_ANY,Message.TYPE_STRUCTURED, or Message.TYPE_TYPED.

Returns:
the Type of this NotificationEvent.

reset

public final void reset()
Description copied from class: AbstractPoolable
Reset the Object to an initial state. Subclasses should override this method appropiately to reset the instance to an initial state.

Specified by:
reset in class AbstractPoolable

doReset

protected void doReset()

addReference

public void addReference()
Add a reference on this NotificationEvent. After Usage removeReference must be called.


removeReference

protected void removeReference()
release this NotificationEvent. If the internal Refcounter is zero the NotificationEvent is returned to its pool.


setFilterStage

public void setFilterStage(FilterStage node)

getFilterStage

public FilterStage getFilterStage()

extractValue

public EvaluationResult extractValue(EvaluationContext context,
                                     ComponentName componentRootNode,
                                     RuntimeVariable runtimeVariable)
                              throws EvaluationException
Throws:
EvaluationException

extractFilterableData

public abstract EvaluationResult extractFilterableData(EvaluationContext context,
                                                       ComponentName componentRootNode,
                                                       java.lang.String variable)
                                                throws EvaluationException
Throws:
EvaluationException

extractVariableHeader

public abstract EvaluationResult extractVariableHeader(EvaluationContext context,
                                                       ComponentName componentRootNode,
                                                       java.lang.String variable)
                                                throws EvaluationException
Throws:
EvaluationException

extractValue

public EvaluationResult extractValue(EvaluationContext evaluationContext,
                                     ComponentName componentRootNode)
                              throws EvaluationException
Throws:
EvaluationException

getHandle

public Message getHandle()

initReceiveTimestamp

public void initReceiveTimestamp()

hasStartTime

public abstract boolean hasStartTime()

getStartTime

public abstract long getStartTime()

hasStopTime

public abstract boolean hasStopTime()

getStopTime

public abstract long getStopTime()

hasTimeout

public abstract boolean hasTimeout()

getTimeout

public abstract long getTimeout()

getPriority

public abstract int getPriority()

match

public abstract boolean match(Filter filter)
                       throws UnsupportedFilterableData
Throws:
UnsupportedFilterableData

match

public boolean match(FilterStage filterStage)

match

public abstract boolean match(MappingFilter filter,
                              AnyHolder value)
                       throws UnsupportedFilterableData
Throws:
UnsupportedFilterableData

calcConstraintKey

public static java.lang.String calcConstraintKey(java.lang.String domain_name,
                                                 java.lang.String type_name)
Provide a Uniform Mapping from domain_name and type_name to a Key that can be used to put EventTypes into a Map. if (d1 == d2) AND (t1 == t2) => calcConstraintKey(d1, t1) == calcConstraintKey(d2, t2).

Parameters:
domain_name - a String value
type_name - a String value
Returns:
an Unique Constraint Key.