ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.conversation
Interface MessageDescription

All Known Implementing Classes:
BasicMessageDescription

public interface MessageDescription

The MessageDescription interface represents the description of a message, for the purpose of classifying and transforming it.

A ConversationPolicyHandler processes an inbound message by attempting to match it against MessageDescriptions associated with the transitions of the conversation policy it is executing. When a match is found, that transition is taken. Similarly, it processes outbound decision data by testing whether the decision data can be transformed into a message matching the MessageDescription associated with the transition given by the decision data's name.

A MessageDescription consists of a two-level description of a message: the "ContentType" and the "Schema". ContentType and Schema are more-or-less arbitrary designations, meant only to permit message descriptions to follow a "genus/species" naming convention.

This interface can be used to describe a great variety of different messages. For example:

Note, however, that the price of this extreme openness is that it provides little guidance to designers of conversation policies.


Field Summary
static java.lang.String ANY
          Indicates that any value (e.g., of schema or contentType) should be considered as a match to this MessageDescription.
 
Method Summary
 java.lang.String getContentType()
          Returns this MessageDescription's content-type string.
 java.lang.String getSchema()
          Returns this MessageDescription's schema string.
 boolean isAnyContentType()
          Indicates whether any string, regardless of content, will be considered a match to this MessageDescription's content type.
 boolean isAnySchema()
          Indicates whether any string, regardless of content, will be considered a match to this MessageDescription's schema.
 boolean matches(MessageDescription d)
          Indicates whether this MessageDescription matches the given MessageDescription.
 

Field Detail

ANY

public static final java.lang.String ANY
Indicates that any value (e.g., of schema or contentType) should be considered as a match to this MessageDescription.
Method Detail

getContentType

public java.lang.String getContentType()
Returns this MessageDescription's content-type string.

Returns:
The content type.

getSchema

public java.lang.String getSchema()
Returns this MessageDescription's schema string.

Returns:
The schema.

isAnyContentType

public boolean isAnyContentType()
Indicates whether any string, regardless of content, will be considered a match to this MessageDescription's content type.

Returns:
true if any string is a match to the content type, false if not.

isAnySchema

public boolean isAnySchema()
Indicates whether any string, regardless of content, will be considered a match to this MessageDescription's schema.

Returns:
true if any string is a match to the schema, false if not.

matches

public boolean matches(MessageDescription d)
Indicates whether this MessageDescription matches the given MessageDescription.

Matching is done first against the contentType, then against the schema. If either description has MessageDescription.ANY for a part, that part is considered to match against all values.

Matching is reflexive: a.matches(b) == b.matches(a)

Parameters:
d - The MessageDescription to match against.
Returns:
true if this MessageDescription matches the given MessageDescription, false if not.

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003