|
Project JXTA | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.document.Advertisement
net.jxta.document.ExtendableAdvertisement
net.jxta.protocol.ConfigParams
A container for configuration parameters.
Field Summary | |
protected int |
modCount
Counts the changes made to this object. |
Constructor Summary | |
ConfigParams()
|
Method Summary | |
boolean |
addDocumentElements(StructuredDocument adv)
Return the advertisement as a document. |
static String |
getAdvertisementType()
Returns the identifying type of this Advertisement. |
String |
getBaseAdvType()
Returns the base type of this advertisement hierarchy. Typically, only the most basic advertisement of a type will implement this method and declare it as final . |
int |
getModCount()
Returns the number of times this object has been modified since it was created. |
StructuredDocument |
getServiceParam(ID key)
Returns the parameter element that matches the given key from the service parameters table. |
Set |
getServiceParamsEntrySet()
Returns the set of params held by this object. |
protected boolean |
handleElement(Element raw)
Process an individual element from the document during parse. Normally, implementations will allow the base advertisments a chance to handle the element before attempting ot handle the element themselves. ie.
|
protected int |
incModCount()
Increases the modification count of the |
void |
putServiceParam(ID key,
Element param)
Puts a service parameter in the service parameters table under the given key. |
StructuredDocument |
removeServiceParam(ID key)
Removes and returns the parameter element that matches the given key from the service parameters table. |
Methods inherited from class net.jxta.document.ExtendableAdvertisement |
getDocument |
Methods inherited from class net.jxta.document.Advertisement |
clone, getAdvType, getID, getIndexFields, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected transient volatile int modCount
Constructor Detail |
public ConfigParams()
Method Detail |
public int getModCount()
protected int incModCount()
public static String getAdvertisementType()
public final String getBaseAdvType()
final
.
getBaseAdvType
in class ExtendableAdvertisement
public void putServiceParam(ID key, Element param)
key
- The key.param
- The parameter, as an element. What is stored is a copy as
a stand-alone StructuredDocument which type is the element's name.public StructuredDocument getServiceParam(ID key)
key
- The key.
public StructuredDocument removeServiceParam(ID key)
key
- The key.
public Set getServiceParamsEntrySet()
protected boolean handleElement(Element raw)
protected boolean handleElement( Element elem ) {
if ( super.handleElement() ) {
// it's been handled.
return true;
}
... handle elements here ...
// we don't know how to handle the element
return false;
}
handleElement
in class ExtendableAdvertisement
raw
- the element to be processed.
public boolean addDocumentElements(StructuredDocument adv)
adv
- the document to add elements to.
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |