|
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.RouteAdvertisement
net.jxta.impl.protocol.RouteAdv
public class RouteAdv
This class implements the basic Route advertisement.
<xs:complexType name="RA"> <xs:sequence> <xs:element name="DstPID" type="jxta:JXTAID" minOccurs="0"/> <xs:element name="Dst"> <xs:complexType> <xs:sequence> <xs:element ref="jxta:APA" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Hops" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element ref="jxta:APA" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType>
RouteAdvertisement
Nested Class Summary | |
---|---|
static class |
RouteAdv.Instantiator
Instantiator for our advertisement |
Field Summary |
---|
Fields inherited from class net.jxta.protocol.RouteAdvertisement |
---|
DEST_PID_TAG |
Method Summary | |
---|---|
RouteAdv |
clone()
|
String |
getAdvType()
Returns the identifying type of this Advertisement. |
Document |
getDocument(MimeMediaType encodeAs)
Write this advertisement into a document of the requested type. |
String[] |
getIndexFields()
Returns the element names on which this advertisement should be indexed. |
protected boolean |
handleElement(Element raw)
Process an individual element from the document during parse. |
Methods inherited from class net.jxta.document.ExtendableAdvertisement |
---|
handleAttribute |
Methods inherited from class net.jxta.document.Advertisement |
---|
toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public RouteAdv clone()
clone
in class RouteAdvertisement
public String getAdvType()
Advertisement.getAdvertisementType()
this method will return the correct
runtime type of an Advertisement object.
This implementation is provided for existing advertisements which do not
provide their own implementation. In most cases you should provide your
own implementation for efficiency reasons.
getAdvType
in class Advertisement
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 Document getDocument(MimeMediaType encodeAs)
"text/plain"
encodes
the document in a "pretty-print" format for human viewing and
"text/xml" which provides an XML format.
We don't have any content to add, just build the document instance and
return it to implementations that actually do something with it.
- Overrides:
getDocument
in class ExtendableAdvertisement
- Parameters:
encodeAs
- MimeMediaType format representation requested.
- Returns:
- The
Advertisement
represented as a Document
of
the requested MIME Media Type.
public String[] getIndexFields()
getIndexFields
in class Advertisement
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |