001: package org.jacorb.notification.interfaces;
002:
003: /*
004: * JacORB - a free Java ORB
005: *
006: * Copyright (C) 1999-2004 Gerald Brose
007: *
008: * This library is free software; you can redistribute it and/or
009: * modify it under the terms of the GNU Library General Public
010: * License as published by the Free Software Foundation; either
011: * version 2 of the License, or (at your option) any later version.
012: *
013: * This library is distributed in the hope that it will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
016: * Library General Public License for more details.
017: *
018: * You should have received a copy of the GNU Library General Public
019: * License along with this library; if not, write to the Free
020: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
021: *
022: */
023:
024: import org.jacorb.notification.NoTranslationException;
025: import org.jacorb.notification.filter.ComponentName;
026: import org.jacorb.notification.filter.EvaluationContext;
027: import org.jacorb.notification.filter.EvaluationException;
028: import org.jacorb.notification.filter.EvaluationResult;
029: import org.jacorb.notification.filter.RuntimeVariable;
030: import org.omg.CORBA.Any;
031: import org.omg.CORBA.AnyHolder;
032: import org.omg.CosNotification.Property;
033: import org.omg.CosNotification.StructuredEvent;
034: import org.omg.CosNotifyFilter.MappingFilter;
035: import org.omg.CosNotifyFilter.UnsupportedFilterableData;
036:
037: /**
038: * @author Alphonse Bendt
039: * @version $Id: Message.java,v 1.9 2006/02/25 15:28:40 alphonse.bendt Exp $
040: */
041:
042: public interface Message extends Disposable {
043: interface MessageStateListener {
044: void actionLifetimeChanged(long lifetime);
045: }
046:
047: int TYPE_ANY = 0;
048:
049: int TYPE_STRUCTURED = 1;
050:
051: int TYPE_TYPED = 2;
052:
053: void setMessageStateListener(MessageStateListener listener);
054:
055: MessageStateListener removeMessageStateListener();
056:
057: String getConstraintKey();
058:
059: Any toAny();
060:
061: StructuredEvent toStructuredEvent();
062:
063: Property[] toTypedEvent() throws NoTranslationException;
064:
065: FilterStage getInitialFilterStage();
066:
067: EvaluationResult extractValue(EvaluationContext context,
068: ComponentName componentRootNode,
069: RuntimeVariable runtimeVariable) throws EvaluationException;
070:
071: EvaluationResult extractFilterableData(EvaluationContext context,
072: ComponentName componentRootNode, String variable)
073: throws EvaluationException;
074:
075: EvaluationResult extractVariableHeader(EvaluationContext context,
076: ComponentName componentRootNode, String variable)
077: throws EvaluationException;
078:
079: EvaluationResult extractValue(EvaluationContext evaluationContext,
080: ComponentName componentRootNode) throws EvaluationException;
081:
082: boolean hasStartTime();
083:
084: long getStartTime();
085:
086: boolean hasStopTime();
087:
088: long getStopTime();
089:
090: boolean hasTimeout();
091:
092: long getTimeout();
093:
094: void setTimeout(long timeout);
095:
096: int getPriority();
097:
098: void setPriority(int priority);
099:
100: boolean match(FilterStage filterStage);
101:
102: boolean match(MappingFilter filter, AnyHolder value)
103: throws UnsupportedFilterableData;
104:
105: Object clone();
106:
107: boolean isInvalid();
108:
109: int getType();
110:
111: void actionTimeout();
112:
113: long getReceiveTimestamp();
114: }
|