KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > notification > interfaces > Message


1 package org.jacorb.notification.interfaces;
2
3 /*
4  * JacORB - a free Java ORB
5  *
6  * Copyright (C) 1999-2004 Gerald Brose
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the Free
20  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  *
22  */

23
24 import org.jacorb.notification.NoTranslationException;
25 import org.jacorb.notification.filter.ComponentName;
26 import org.jacorb.notification.filter.EvaluationContext;
27 import org.jacorb.notification.filter.EvaluationException;
28 import org.jacorb.notification.filter.EvaluationResult;
29 import org.jacorb.notification.filter.RuntimeVariable;
30 import org.omg.CORBA.Any JavaDoc;
31 import org.omg.CORBA.AnyHolder JavaDoc;
32 import org.omg.CosNotification.Property;
33 import org.omg.CosNotification.StructuredEvent;
34 import org.omg.CosNotifyFilter.MappingFilter;
35 import org.omg.CosNotifyFilter.UnsupportedFilterableData;
36
37 /**
38  * @author Alphonse Bendt
39  * @version $Id: Message.java,v 1.8 2005/02/14 00:09:05 alphonse.bendt Exp $
40  */

41
42 public interface Message extends Disposable
43 {
44     interface MessageStateListener {
45         void actionLifetimeChanged(long lifetime);
46     }
47
48     int TYPE_ANY = 0;
49
50     int TYPE_STRUCTURED = 1;
51
52     int TYPE_TYPED = 2;
53
54
55     void setMessageStateListener(MessageStateListener listener);
56
57
58     MessageStateListener removeMessageStateListener();
59
60
61     String JavaDoc getConstraintKey();
62
63
64     Any JavaDoc toAny();
65
66
67     StructuredEvent toStructuredEvent();
68
69
70     Property[] toTypedEvent() throws NoTranslationException;
71
72
73     FilterStage getInitialFilterStage();
74
75
76     EvaluationResult extractValue(EvaluationContext context,
77                                   ComponentName componentRootNode,
78                                   RuntimeVariable runtimeVariable )
79         throws EvaluationException;
80
81
82     EvaluationResult extractFilterableData(EvaluationContext context,
83                                            ComponentName componentRootNode,
84                                            String JavaDoc variable)
85         throws EvaluationException;
86
87
88     EvaluationResult extractVariableHeader(EvaluationContext context,
89                                            ComponentName componentRootNode,
90                                            String JavaDoc variable)
91         throws EvaluationException;
92
93
94
95     EvaluationResult extractValue( EvaluationContext evaluationContext,
96                                    ComponentName componentRootNode )
97         throws EvaluationException;
98
99
100     boolean hasStartTime();
101
102
103     long getStartTime();
104
105
106     boolean hasStopTime();
107
108
109     long getStopTime();
110
111
112     boolean hasTimeout();
113
114
115     long getTimeout();
116
117
118     void setTimeout(long timeout);
119
120
121     int getPriority();
122
123
124     void setPriority(int priority);
125
126
127     boolean match(FilterStage filterStage);
128
129
130     boolean match(MappingFilter filter,
131                   AnyHolder JavaDoc value) throws UnsupportedFilterableData;
132
133
134     Object JavaDoc clone();
135
136
137     boolean isInvalid();
138
139
140     int getType();
141
142
143     void actionTimeout();
144 }
145
Popular Tags