Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:

- A WSDL "PurchaseOrderMessage" message might be described as `{ContentType="wsdl-message", Schema="PurchageOrderMessage"}`.
- Alternatively, the WSDL portType and operation might be given. E.g., `{ContentType="wsdl-operation", Schema="POPortType.sendPurchaseOrder"}`.
- An XML message that conformed to an XML Schema file "myMessage.xsd" might be described as `{ContentType="xml", Schema="myMessage.xsd"}`
- A KQML message with a performative of "inform" might be described as `{ContentType="KQML", Schema="inform"}`.

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.

  See Also:
    Constant Field Values

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.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005