org.jacorb.notification

Class AbstractMessage

public abstract class AbstractMessage extends AbstractPoolable

Version: $Id: AbstractMessage.java,v 1.32 2006/07/14 12:05:19 alphonse.bendt Exp $

Author: Alphonse Bendt

Field Summary
protected booleanconsumerAdminFiltered_
protected booleanproxyConsumerFiltered_
protected booleanproxySupplierFiltered_
protected intreferenced_
Internal Reference Counter.
protected booleansupplierAdminFiltered_
Method Summary
voidaddReference()
Add a reference on this NotificationEvent.
static StringcalcConstraintKey(String domain_name, 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 voiddoReset()
abstract EvaluationResultextractFilterableData(EvaluationContext context, ComponentName componentRootNode, String variable)
EvaluationResultextractValue(EvaluationContext context, ComponentName componentRootNode, RuntimeVariable runtimeVariable)
EvaluationResultextractValue(EvaluationContext evaluationContext, ComponentName componentRootNode)
abstract EvaluationResultextractVariableHeader(EvaluationContext context, ComponentName componentRootNode, String variable)
abstract StringgetConstraintKey()
get the Constraint Key for this Event.
FilterStagegetFilterStage()
MessagegetHandle()
abstract intgetPriority()
longgetReceiveTimestamp()
abstract longgetStartTime()
abstract longgetStopTime()
abstract longgetTimeout()
abstract intgetType()
get the Type of this NotificationEvent.
abstract booleanhasStartTime()
abstract booleanhasStopTime()
abstract booleanhasTimeout()
voidinitReceiveTimestamp()
abstract booleanmatch(Filter filter)
booleanmatch(FilterStage filterStage)
abstract booleanmatch(MappingFilter filter, AnyHolder value)
protected voidremoveReference()
release this NotificationEvent.
voidreset()
voidsetFilterStage(FilterStage node)
abstract AnytoAny()
Access this NotificationEvent as Any.
abstract StructuredEventtoStructuredEvent()
Access this NotificationEvent as StructuredEvent.
abstract Property[]toTypedEvent()
convert this message to a TypedEvent.

Field Detail

consumerAdminFiltered_

protected boolean consumerAdminFiltered_

proxyConsumerFiltered_

protected boolean proxyConsumerFiltered_

proxySupplierFiltered_

protected boolean proxySupplierFiltered_

referenced_

protected int referenced_
Internal Reference Counter.

supplierAdminFiltered_

protected boolean supplierAdminFiltered_

Method Detail

addReference

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

calcConstraintKey

public static String calcConstraintKey(String domain_name, 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.

doReset

protected void doReset()

extractFilterableData

public abstract EvaluationResult extractFilterableData(EvaluationContext context, ComponentName componentRootNode, String variable)

extractValue

public EvaluationResult extractValue(EvaluationContext context, ComponentName componentRootNode, RuntimeVariable runtimeVariable)

extractValue

public EvaluationResult extractValue(EvaluationContext evaluationContext, ComponentName componentRootNode)

extractVariableHeader

public abstract EvaluationResult extractVariableHeader(EvaluationContext context, ComponentName componentRootNode, String variable)

getConstraintKey

public abstract 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

getFilterStage

public FilterStage getFilterStage()

getHandle

public Message getHandle()

getPriority

public abstract int getPriority()

getReceiveTimestamp

public long getReceiveTimestamp()

getStartTime

public abstract long getStartTime()

getStopTime

public abstract long getStopTime()

getTimeout

public abstract long getTimeout()

getType

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

Returns: the Type of this NotificationEvent.

hasStartTime

public abstract boolean hasStartTime()

hasStopTime

public abstract boolean hasStopTime()

hasTimeout

public abstract boolean hasTimeout()

initReceiveTimestamp

public void initReceiveTimestamp()

match

public abstract boolean match(Filter filter)

match

public boolean match(FilterStage filterStage)

match

public abstract boolean match(MappingFilter filter, AnyHolder value)

removeReference

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

reset

public final void reset()

setFilterStage

public void setFilterStage(FilterStage node)

toAny

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

Returns: an Any value

toStructuredEvent

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

Returns: a StructuredEvent value

toTypedEvent

public abstract Property[] toTypedEvent()
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.