|
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
public abstract class ConfigParams
A container for collections of configuration parameters. Configuration
parameters are stored in a Map which is keyed by JXTA ID
s and whose
values are Advertisement
s.
Field Summary | |
---|---|
protected AtomicInteger |
modCount
Counts the changes made to this object. |
Constructor Summary | |
---|---|
protected |
ConfigParams()
Default Constructor. |
Method Summary | |
---|---|
boolean |
addDocumentElements(StructuredDocument adv)
Return the advertisement as a document. |
ConfigParams |
clone()
|
boolean |
equals(Object other)
|
static String |
getAdvertisementType()
Returns the identifying type of this Advertisement. |
String |
getBaseAdvType()
Returns the base type of this advertisement hierarchy. |
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<Map.Entry<ID,StructuredDocument>> |
getServiceParamsEntrySet()
Deprecated. This method exposes the internal data structures of the advertisement and will be removed in order to prevent unexpected behaviour. |
Advertisement |
getSvcConfigAdvertisement(ID key)
Gets an advertisement from the service parameters table under the given key. |
protected boolean |
handleElement(Element raw)
Process an individual element from the document during parse. |
protected int |
incModCount()
Increases the modification count of this instance. |
boolean |
isSvcEnabled(ID key)
Gets an advertisement from the service parameters table under the given key. |
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. |
void |
removeSvcConfigAdvertisement(ID key)
Removes any parameters for the given key from the service parameters table. |
void |
setSvcConfigAdvertisement(ID key,
Advertisement adv)
Puts an advertisement into the service parameters table under the given key. |
void |
setSvcConfigAdvertisement(ID key,
Advertisement adv,
boolean enabled)
Puts an advertisement into the service parameters table under the given key. |
Methods inherited from class net.jxta.document.ExtendableAdvertisement |
---|
getDocument, handleAttribute |
Methods inherited from class net.jxta.document.Advertisement |
---|
getAdvType, getID, getIndexFields, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final transient AtomicInteger modCount
Constructor Detail |
---|
protected ConfigParams()
Method Detail |
---|
public static String getAdvertisementType()
public ConfigParams clone()
clone
in class Advertisement
public boolean equals(Object other)
equals
in class Object
public final String getBaseAdvType()
final
.
getBaseAdvType
in class ExtendableAdvertisement
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.
true
if the element was recognized, otherwise false.public boolean addDocumentElements(StructuredDocument adv)
adv
- the document to add elements to.
public int getModCount()
protected int incModCount()
public void putServiceParam(ID key, Element param)
key
- The key.param
- The parameter document.public void setSvcConfigAdvertisement(ID key, Advertisement adv)
ModuleClassID
. This method makes a
clone of the advertisement.
key
- The key.adv
- The advertisement, a clone of which is stored or null
to forget this key.public void setSvcConfigAdvertisement(ID key, Advertisement adv, boolean enabled)
ModuleClassID
. This method makes a
clone of the advertisement.
key
- The key.adv
- The advertisement, a clone of which is stored or null
to forget this key.enabled
- If true then the service is enabled or disabled if false.public boolean isSvcEnabled(ID key)
ModuleClassID
. This method makes a
clone of the advertisement.
key
- The key.
true
then the service is enabled otherwise if
the service is disabled.public Advertisement getSvcConfigAdvertisement(ID key)
ModuleClassID
. This method makes a
clone of the advertisement.
key
- The key.
null
.public StructuredDocument getServiceParam(ID key)
key
- The key.
public StructuredDocument removeServiceParam(ID key)
key
- The key.
null
if not found.public void removeSvcConfigAdvertisement(ID key)
key
- The key.@Deprecated public Set<Map.Entry<ID,StructuredDocument>> getServiceParamsEntrySet()
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |