|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.conversation.base.BasicMessageDescription
The BasicMessageDescription class is a straightforward, vanilla-Java implementation of the MessageDescription interface.
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 |
public BasicMessageDescription()
Assigns MessageDescription.ANY to both content-type and schema.
public BasicMessageDescription(java.lang.String c)
Assigns MessageDescription.ANY to the schema.
c
- The content-type.public BasicMessageDescription(java.lang.String c, java.lang.String s)
c
- The content-type.s
- The schema.Method Detail |
public java.lang.String getContentType()
MessageDescription
getContentType
in interface MessageDescription
com.ibm.conversation.MessageDescription
public java.lang.String getSchema()
MessageDescription
getSchema
in interface MessageDescription
com.ibm.conversation.MessageDescription
public boolean isAnyContentType()
MessageDescription
isAnyContentType
in interface MessageDescription
com.ibm.conversation.MessageDescription
public boolean isAnySchema()
MessageDescription
isAnySchema
in interface MessageDescription
com.ibm.conversation.MessageDescription
public boolean matches(MessageDescription desc)
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)
matches
in interface MessageDescription
com.ibm.conversation.MessageDescription
d
- The MessageDescription to match against.public boolean equals(MessageDescription desc)
Does not treat MessageDescription.ANY as a wild-card; expects literal string match.
The
- MessageDescription to compare.public boolean equals(java.lang.Object obj)
First tests whether the given object is a MessageDescription; and if so, casts it an calls
this.equals(MessageDescription)
.
equals
in class java.lang.Object
obj
- The object to compare.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |