net.jxta.share
Class ShareMessage
java.lang.Object
|
+--net.jxta.share.ShareMessage
- Direct Known Subclasses:
- PingCmdMessage
- public class ShareMessage
- extends java.lang.Object
This class provides a static method for constructing instances of various
sub-classes of StructuredDocument
. Behind the scenes, it also
provides for the registration of the mime-types and constructors needed to
accomplish the construction.
FIXME MJD 20010223 This implementation needs a way to return the list of mime media types supported
- Since:
- Jxta 0.2
Field Summary |
static java.lang.String |
name
|
Method Summary |
protected void |
addElements(net.jxta.document.StructuredDocument root,
net.jxta.document.Element node)
|
net.jxta.document.Document |
getDocument(net.jxta.document.MimeMediaType encodeAs)
Write advertisement into a document. |
java.lang.String |
getName()
|
java.lang.String |
prettyDisplay()
|
protected void |
readit(net.jxta.document.TextElement doc)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
name
public static java.lang.String name
ShareMessage
public ShareMessage()
ShareMessage
public ShareMessage(java.io.InputStream stream)
throws java.lang.Exception
ShareMessage
public ShareMessage(net.jxta.document.Element root)
ShareMessage
public ShareMessage(net.jxta.document.TextElement doc)
getName
public java.lang.String getName()
readit
protected void readit(net.jxta.document.TextElement doc)
addElements
protected void addElements(net.jxta.document.StructuredDocument root,
net.jxta.document.Element node)
throws java.lang.Exception
getDocument
public net.jxta.document.Document getDocument(net.jxta.document.MimeMediaType encodeAs)
throws java.lang.Exception
- Write advertisement into a document. encodeAs is a mime media-type
specification and provides the form of the document which is being
requested. Two standard document forms are defined. "text/text" encodes
the document in a form nice for printing out and "text/xml" which
provides an XML format.
- Parameters:
doc
- the document to be used in the construction.
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
prettyDisplay
public java.lang.String prettyDisplay()