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.base
Class BasicMessageDescription

    java.lang.Object
      com.ibm.conversation.base.BasicMessageDescription

All Implemented Interfaces:
  MessageDescription

public class BasicMessageDescription
extends java.lang.Object
implements MessageDescription

The BasicMessageDescription class is a straightforward, vanilla-Java implementation of the MessageDescription interface.

Field Summary

Fields inherited from interface com.ibm.conversation.MessageDescription
`ANY`

Constructor Summary
`BasicMessageDescription()` Constructs a BasicMessageDescription object.
`BasicMessageDescription(java.lang.String c)` Constructs a BasicMessageDescription object with the given content-type.
`BasicMessageDescription(java.lang.String c, java.lang.String s)` Constructs a BasicMessageDescription object with the given content-type and schema.

Method Summary
`boolean` | `equals(MessageDescription desc)` Compares this MessageDescription with the given one, matching on both ContentType and Schema.
`boolean` | `equals(java.lang.Object obj)` Compares this MessageDescription with the given object.
`java.lang.String` | `getContentType()` Returns this MessageDescription's content-type string.
`java.lang.String` | `getSchema()` Returns this MessageDescription's schema string.
`int` | `hashCode()` Returns the hash-code of the string form of this MessageDescription.
`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 desc)` Indicates whether this MessageDescription matches the given MessageDescription.
`java.lang.String` | `toString()` Returns a string representation of this MessageDescription, in the following format: "<content-type>/<schema>".

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BasicMessageDescription

    public BasicMessageDescription()

  Constructs a BasicMessageDescription object.

  Assigns MessageDescription.ANY to both content-type and schema.

### BasicMessageDescription

    public BasicMessageDescription(java.lang.String c)

  Constructs a BasicMessageDescription object with the given content-type.

  Assigns MessageDescription.ANY to the schema.

Parameters:
  `c` - The content-type.

### BasicMessageDescription

    public BasicMessageDescription(java.lang.String c,
                                   java.lang.String s)

  Constructs a BasicMessageDescription object with the given content-type and schema.

Parameters:
  `c` - The content-type.
  `s` - The schema.

Method Detail

### getContentType

    public java.lang.String getContentType()

  Description copied from interface: `MessageDescription`
  Returns this MessageDescription's content-type string.

  Specified by:
    `getContentType` in interface `MessageDescription`
  Returns:
    The content type.

### getSchema

    public java.lang.String getSchema()

  Description copied from interface: `MessageDescription`
  Returns this MessageDescription's schema string.

  Specified by:
    `getSchema` in interface `MessageDescription`
  Returns:
    The schema.

### isAnyContentType

    public boolean isAnyContentType()

  Description copied from interface: `MessageDescription`
  Indicates whether any string, regardless of content, will be considered a match to this MessageDescription's content type.

  Specified by:
    `isAnyContentType` in interface `MessageDescription`
  Returns:
    true if any string is a match to the content type, false if not.

### isAnySchema

    public boolean isAnySchema()

  Description copied from interface: `MessageDescription`
  Indicates whether any string, regardless of content, will be considered a match to this MessageDescription's schema.

  Specified by:
    `isAnySchema` in interface `MessageDescription`
  Returns:
    true if any string is a match to the schema, false if not.

### matches

    public boolean matches(MessageDescription desc)

  Description copied from interface: `MessageDescription`
  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)

  Specified by:
    `matches` in interface `MessageDescription`
  Parameters:
    `desc` - The MessageDescription to match against.
  Returns:
    true if this MessageDescription matches the given MessageDescription, false if not.

### equals

    public boolean equals(MessageDescription desc)

  Compares this MessageDescription with the given one, matching on both ContentType and Schema.

  Does not treat MessageDescription.ANY as a wild-card; expects literal string match.

  Parameters:
    `desc` - The MessageDescription to compare.
  Returns:
    true if the given MessageDescription's content-type and schema both equal those of this one, false otherwise.

### equals

    public boolean equals(java.lang.Object obj)

  Compares this MessageDescription with the given object.

  First tests whether the given object is a MessageDescription; and if so, casts it an calls `this.equals(MessageDescription)`.

  Parameters:
    `obj` - The object to compare.
  Returns:
    true if the given object is a MessageDescription equal to this one, false if not.

### hashCode

    public int hashCode()

  Returns the hash-code of the string form of this MessageDescription.

  Returns:
    The hash code.

### toString

    public java.lang.String toString()

  Returns a string representation of this MessageDescription, in the following format: "<content-type>/<schema>".

  Returns:
    The String representation of this MessageDescription.

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