1 package org.jacorb.notification.interfaces; 2 3 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 ; 31 import org.omg.CORBA.AnyHolder ; 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 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 getConstraintKey(); 62 63 64 Any 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 variable) 85 throws EvaluationException; 86 87 88 EvaluationResult extractVariableHeader(EvaluationContext context, 89 ComponentName componentRootNode, 90 String 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 value) throws UnsupportedFilterableData; 132 133 134 Object clone(); 135 136 137 boolean isInvalid(); 138 139 140 int getType(); 141 142 143 void actionTimeout(); 144 } 145 | Popular Tags |