gov.nasa.arc.brahms.vm.api.events
Interface IEventMessage

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
IAssignmentExecutedEM, IBeliefAssertedEM, IBeliefRetractedEM, IBeliefTransferredEM, IBroadcastAbortedEM, IBroadcastCompletedEM, IBroadcastContinuedEM, IBroadcastContinuedFromImpasseEM, IBroadcastEndedEM, IBroadcastImpassedEM, IBroadcastInterruptedEM, IBroadcastStartedEM, ICommunicateAbortedEM, ICommunicateCompletedEM, ICommunicateContinuedEM, ICommunicateContinuedFromImpasseEM, ICommunicateEndedEM, ICommunicateImpassedEM, ICommunicateInterruptedEM, ICommunicateStartedEM, ICompositeActivityAbortedEM, ICompositeActivityCompletedEM, ICompositeActivityContinuedEM, ICompositeActivityContinuedFromImpasseEM, ICompositeActivityEndedEM, ICompositeActivityImpassedEM, ICompositeActivityInterruptedEM, ICompositeActivityStartedEM, IConceptCreatedEM, IConceptDeletedEM, IConceptLoadedEM, IConsequenceFiredEM, ICreateAgentAbortedEM, ICreateAgentCompletedEM, ICreateAgentContinuedEM, ICreateAgentContinuedFromImpasseEM, ICreateAgentEndedEM, ICreateAgentImpassedEM, ICreateAgentInterruptedEM, ICreateAgentStartedEM, ICreateAreaAbortedEM, ICreateAreaCompletedEM, ICreateAreaContinuedEM, ICreateAreaContinuedFromImpasseEM, ICreateAreaEndedEM, ICreateAreaImpassedEM, ICreateAreaInterruptedEM, ICreateAreaStartedEM, ICreateObjectAbortedEM, ICreateObjectCompletedEM, ICreateObjectContinuedEM, ICreateObjectContinuedFromImpasseEM, ICreateObjectEndedEM, ICreateObjectImpassedEM, ICreateObjectInterruptedEM, ICreateObjectStartedEM, IDeleteExecutedEM, IDetectableDetectedEM, IDetectableTriggeredEM, IFactAssertedEM, IFactRetractedEM, IFrameAbortedEM, IFrameAvailableEM, IFrameCompletedEM, IFrameContinuedEM, IFrameContinuedFromImpasseEM, IFrameEndedEM, IFrameImpassedEM, IFrameInterruptedEM, IFrameStartedEM, IFrameUnavailableEM, IGestureActivityAbortedEM, IGestureActivityCompletedEM, IGestureActivityContinuedEM, IGestureActivityContinuedFromImpasseEM, IGestureActivityEndedEM, IGestureActivityImpassedEM, IGestureActivityInterruptedEM, IGestureActivityStartedEM, IGetActivityAbortedEM, IGetActivityCompletedEM, IGetActivityContinuedEM, IGetActivityContinuedFromImpasseEM, IGetActivityEndedEM, IGetActivityImpassedEM, IGetActivityInterruptedEM, IGetActivityStartedEM, IJavaActivityAbortedEM, IJavaActivityCompletedEM, IJavaActivityContinuedEM, IJavaActivityContinuedFromImpasseEM, IJavaActivityEndedEM, IJavaActivityImpassedEM, IJavaActivityInterruptedEM, IJavaActivityStartedEM, IMethodInvocationExecutedEM, IModelLoadedEM, IMoveAbortedEM, IMoveCompletedEM, IMoveContinuedEM, IMoveContinuedFromImpasseEM, IMoveEndedEM, IMoveImpassedEM, IMoveInterruptedEM, IMoveStartedEM, IPartAddedEM, IPrimitiveActivityAbortedEM, IPrimitiveActivityCompletedEM, IPrimitiveActivityContinuedEM, IPrimitiveActivityContinuedFromImpasseEM, IPrimitiveActivityEndedEM, IPrimitiveActivityImpassedEM, IPrimitiveActivityInterruptedEM, IPrimitiveActivityStartedEM, IPutActivityAbortedEM, IPutActivityCompletedEM, IPutActivityContinuedEM, IPutActivityContinuedFromImpasseEM, IPutActivityEndedEM, IPutActivityImpassedEM, IPutActivityInterruptedEM, IPutActivityStartedEM, ISimulationEndedEM, ISimulationStartedEM, IVariableBoundEM

public interface IEventMessage
extends java.io.Serializable

The IEventMessage interface is the interface to the message published to the event notifier's subscribers to notify them of state changes in the virtual machine, agents, scheduler or world state.

Version:
27 September 2000
Author:
Ron van Hoof

Method Summary
 java.io.Serializable getBody()
          Returns the message body.
 boolean getBooleanProperty(java.lang.String name)
          Return the boolean property value with the given name.
 byte getByteProperty(java.lang.String name)
          Return the byte property value with the given name.
 double getDoubleProperty(java.lang.String name)
          Return the double property value with the given name.
 float getFloatProperty(java.lang.String name)
          Return the float property value with the given name.
 int getIntProperty(java.lang.String name)
          Return the integer property value with the given name.
 long getLongProperty(java.lang.String name)
          Return the long property value with the given name.
 java.lang.Object getObjectProperty(java.lang.String name)
          Return the Java object property value with the given name.
 java.util.Enumeration getPropertyNames()
          Return an Enumeration of all the property names.
 short getShortProperty(java.lang.String name)
          Return the short property value with the given name.
 java.lang.String getStringProperty(java.lang.String name)
          Return the String property value with the given name.
 boolean propertyExists(java.lang.String name)
          Check if a property value exists.
 

Method Detail

getBody

java.io.Serializable getBody()
                             throws EventNotifierException
Returns the message body.

Returns:
Serializable the message body
Throws:
EventNotifierException - if no body is specified

getPropertyNames

java.util.Enumeration getPropertyNames()
                                       throws EventNotifierException
Return an Enumeration of all the property names.

Returns:
Enumeration an enumeration of all the names of property values.
Throws:
EventNotifierException - if EventNotifier fails to get Property names due to some internal EventNotifier error.

propertyExists

boolean propertyExists(java.lang.String name)
                       throws EventNotifierException
Check if a property value exists.

Parameters:
name - the name of the property to test
Returns:
boolean true if the property does exist.
Throws:
EventNotifierException - if EventNotifier fails to check if property exists due to some internal EventNotifier error.

getBooleanProperty

boolean getBooleanProperty(java.lang.String name)
                           throws EventNotifierException
Return the boolean property value with the given name.

Parameters:
name - the name of the boolean property
Returns:
boolean the boolean property value with the given name.
Throws:
EventNotifierException - if EventNotifier fails to get Property due to some internal EventNotifier error.
MessageFormatException - if this type conversion is invalid.

getByteProperty

byte getByteProperty(java.lang.String name)
                     throws EventNotifierException
Return the byte property value with the given name.

Parameters:
name - the name of the byte property
Returns:
byte the byte property value with the given name.
Throws:
EventNotifierException - if EventNotifier fails to get Property due to some internal EventNotifier error.
MessageFormatException - if this type conversion is invalid.

getShortProperty

short getShortProperty(java.lang.String name)
                       throws EventNotifierException
Return the short property value with the given name.

Parameters:
name - the name of the short property
Returns:
short the short property value with the given name.
Throws:
EventNotifierException - if EventNotifier fails to get Property due to some internal EventNotifier error.
MessageFormatException - if this type conversion is invalid.

getIntProperty

int getIntProperty(java.lang.String name)
                   throws EventNotifierException
Return the integer property value with the given name.

Parameters:
name - the name of the integer property
Returns:
int the integer property value with the given name.
Throws:
EventNotifierException - if EventNotifier fails to get Property due to some internal EventNotifier error.
MessageFormatException - if this type conversion is invalid.

getLongProperty

long getLongProperty(java.lang.String name)
                     throws EventNotifierException
Return the long property value with the given name.

Parameters:
name - the name of the long property
Returns:
long the long property value with the given name.
Throws:
EventNotifierException - if EventNotifier fails to get Property due to some internal EventNotifier error.
MessageFormatException - if this type conversion is invalid.

getFloatProperty

float getFloatProperty(java.lang.String name)
                       throws EventNotifierException
Return the float property value with the given name.

Parameters:
name - the name of the float property
Returns:
float the float property value with the given name.
Throws:
EventNotifierException - if EventNotifier fails to get Property due to some internal EventNotifier error.
MessageFormatException - if this type conversion is invalid.

getDoubleProperty

double getDoubleProperty(java.lang.String name)
                         throws EventNotifierException
Return the double property value with the given name.

Parameters:
name - the name of the double property
Returns:
double the double property value with the given name.
Throws:
EventNotifierException - if EventNotifier fails to get Property due to some internal EventNotifier error.
MessageFormatException - if this type conversion is invalid.

getStringProperty

java.lang.String getStringProperty(java.lang.String name)
                                   throws EventNotifierException
Return the String property value with the given name.

Parameters:
name - the name of the String property
Returns:
String the String property value with the given name. If there is no property by this name, a null value is returned.
Throws:
EventNotifierException - if EventNotifier fails to get Property due to some internal EventNotifier error.
MessageFormatException - if this type conversion is invalid.

getObjectProperty

java.lang.Object getObjectProperty(java.lang.String name)
                                   throws EventNotifierException
Return the Java object property value with the given name.

Note that this method can be used to return in objectified format, an object that had been stored as a property in the Message with the equivalent setObject method call, or it's equivalent primitive set method.

Parameters:
name - the name of the Java object property
Returns:
Object the Java object property value with the given name, in objectified format (ie. if it set as an int, then a Integer is returned). If there is no property by this name, a null value is returned.
Throws:
EventNotifierException - if EventNotifier fails to get Property due to some internal EventNotifier error.


Copyright © 1997-2012 All Rights Reserved.