|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.engine.slp.Attribute
SLPv2 Service Attribute
from RFC 2608 (Service Location Protocol, Version 2):
The allowable attributes which may be used are typically specified by a Service Template [13] for a particular service type. Services which are advertised according to a standard template MUST register all service attributes which the standard template requires. URLs with schemes other than "service:" MAY be registered with attributes.
Non-standard attribute names SHOULD begin with "x-", because no standard attribute name will ever have those initial characters.
An attribute list is a string encoding of the attributes of a service. The following ABNF [11] grammar defines attribute lists:
attr-list = attribute / attribute `,' attr-list
attribute = `(' attr-tag `=' attr-val-list `)' / attr-tag
attr-val-list = attr-val / attr-val `,' attr-val-list
attr-tag = 1*safe-tag
attr-val = intval / strval / boolval / opaque
intval = [-]1*DIGIT
strval = 1*safe-val
boolval = "true" / "false"
opaque = "\FF" 1*escape-val
safe-val = ; Any character except reserved.
safe-tag = ; Any character except reserved, star and bad-tag.
reserved = `(' / `)' / `,' / `\' / `!' / `<' / `=' / `>' / `~' / CTL
escape-val = `\' HEXDIG HEXDIG
bad-tag = CR / LF / HTAB / `_'
star = `*'
The <attr-list>, if present, MUST be scanned prior to evaluation for all occurrences of the escape character `\'. Reserved characters MUST be escaped (other characters MUST NOT be escaped). All escaped characters must be restored to their value before attempting string matching. For Opaque values, escaped characters are not converted - they are interpreted as bytes.
A string which contains escaped values other than from the reserved set of characters is illegal. If such a string is included in an <attr-list>, <tag-list> or search filter, the SA or DA which receives it MUST return a PARSE_ERROR to the message.
A keyword has only an <attr-tag>, and no values. Attributes can have one or multiple values. All values are expressed as strings.
When values have been advertised by a SA or are registered in a DA, they can take on implicit typing rules for matching incoming requests.
Stored values must be consistent, i.e., x=4,true,sue,\ff\00\00 is disallowed. A DA or SA receiving such an <attr-list> MUST return an INVALID_REGISTRATION error.
Method Summary | |
---|---|
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one. |
static Attribute |
find(java.lang.String tag,
java.util.List attributes)
|
java.lang.String |
getTag()
Returns attribute tag |
java.lang.Object |
getValue()
Returns attribute value |
int |
hashCode()
Returns a hash code value for the object. |
static java.util.List |
parse(java.lang.String attributeList)
Parses the string argument as a list of Attribute objects |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public static java.util.List parse(java.lang.String attributeList) throws AttributeFormatException, com.tivoli.twg.engine.slp.MessageFormatException
Attribute
objects
Attribute
objects
AttributeFormatException
- if the string does not contain a parsable attribute list
MessageFormatException
- if the string does not contain a parsable attribute listpublic static Attribute find(java.lang.String tag, java.util.List attributes)
public boolean equals(java.lang.Object object)
Object.equals(java.lang.Object)
public int hashCode()
Object.hashCode()
public java.lang.String getTag()
public java.lang.Object getValue()
public final java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
Object.clone()
public java.lang.String toString()
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |