|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageReflector
Represents an SMA message reflector.
A message reflector, part of the generic message view, enables the SMA runtime (and the user) to view a message using a map model i.e. as a set of named fields. This interface defines the message reflection interface. It is used by the SMA runtime to inspect message content for use with channel keys and filters.
Method Summary | |
---|---|
boolean |
fieldExists(Object message,
String name)
Check if a field of the supplied name exists in a message. |
com.neeve.raw.RawString |
getFieldValueAsRawString(Object message,
String name)
Get the value of a reflectable field in a message as a string. |
com.neeve.raw.RawString |
getFieldValueAsRawString(Object message,
String[] pathComponents)
Get the value of a reflectable field in a message as a string. |
String |
getFieldValueAsString(Object message,
String name)
Get the value of a reflectable field in a message as a string. |
String |
getFieldValueAsString(Object message,
String[] pathComponents)
Get the value of a reflectable field in a message as a string. |
boolean |
isFieldReflectable(Object message,
String name)
Check if a field of the supplied name is reflectable. |
boolean |
needsSync()
Check if a view needs to be sync'd for reflection. |
Method Detail |
---|
boolean needsSync()
boolean fieldExists(Object message, String name)
message
- The message to check in.name
- The field to check for.boolean isFieldReflectable(Object message, String name)
message
- The message to check in.name
- The field to check for.
String getFieldValueAsString(Object message, String name)
Note that this method is generally less efficient than its variant
getFieldValueAsString(Object, String[])
since this method requires
splitting the supplied path name into its dot separated path components. In cases
where the caller intends to reuse the same path name often, it is better
for the caller to supply it in split form.
message
- The message to introspect.name
- The field whose value is to be retrieved specified as a bean path
fieldExists(java.lang.Object, java.lang.String)
and isFieldReflectable(java.lang.Object, java.lang.String)
methodsString getFieldValueAsString(Object message, String[] pathComponents)
message
- The message to introspect.pathComponents
- The path components to use to access the field.
fieldExists(java.lang.Object, java.lang.String)
and isFieldReflectable(java.lang.Object, java.lang.String)
methodscom.neeve.raw.RawString getFieldValueAsRawString(Object message, String name)
Note that this method is generally less efficient than its variant
getFieldValueAsString(Object, String[])
since this method requires
splitting the supplied path name into its dot separated path components. In cases
where the caller intends to reuse the same path name often, it is better
for the caller to supply it in split form.
message
- The message to introspect.name
- The field whose value is to be retrieved specified as a bean path
fieldExists(java.lang.Object, java.lang.String)
and isFieldReflectable(java.lang.Object, java.lang.String)
methodscom.neeve.raw.RawString getFieldValueAsRawString(Object message, String[] pathComponents)
message
- The message to introspect.pathComponents
- The path components to use to access the field.
fieldExists(java.lang.Object, java.lang.String)
and isFieldReflectable(java.lang.Object, java.lang.String)
methods
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |