|
Project JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.protocol.SrdiMessage
net.jxta.impl.protocol.SrdiMessageImpl
public class SrdiMessageImpl
SrdiMessageImpl provides the SRDI message binding
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.jxta.protocol.SrdiMessage |
---|
SrdiMessage.Entry |
Field Summary | |
---|---|
static String |
entryTag
Entry element name |
static String |
expirationTag
Expiration element name |
static String |
pidTag
PeerID element name |
static String |
pKeyTag
Primary Key element name |
static String |
sKeyTag
Secondary Key element name |
static String |
ttlTag
ttl element name |
static String |
valTag
Value element name |
Constructor Summary | |
---|---|
SrdiMessageImpl()
Construct an empty doc |
|
SrdiMessageImpl(Element root)
Construct from a StructuredDocument |
|
SrdiMessageImpl(InputStream stream)
Deprecated. It's better to generate the document yourself. This method cannot deduce the mime type of the content. |
|
SrdiMessageImpl(PeerID peerid,
int ttl,
String pKey,
List entries)
Construct a msg from entries |
|
SrdiMessageImpl(PeerID peerid,
int ttl,
String pKey,
String key,
String value,
long expiration)
Construct a msg consisting of a single entry |
|
SrdiMessageImpl(String peerid,
int ttl,
String pKey,
List entries)
Construct a doc from vectors of strings |
Method Summary | |
---|---|
Document |
getDocument(MimeMediaType encodeAs)
return a Document representation of this object |
void |
readIt(XMLElement doc)
|
String |
toString()
returns the document string representation of this object |
Methods inherited from class net.jxta.protocol.SrdiMessage |
---|
addEntry, addEntry, decrementTTL, getEntries, getMessageType, getPeerID, getPrimaryKey, getTTL, setEntries, setPeerID, setPrimaryKey, setTTL |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String pidTag
public static final String ttlTag
public static final String entryTag
public static final String pKeyTag
public static final String sKeyTag
public static final String valTag
public static final String expirationTag
Constructor Detail |
---|
public SrdiMessageImpl()
public SrdiMessageImpl(InputStream stream) throws IOException
stream
- the underlying input stream.
IOException
- if an I/O error occurs.public SrdiMessageImpl(Element root)
root
- the underlying documentpublic SrdiMessageImpl(PeerID peerid, int ttl, String pKey, List entries)
peerid
- PeerID associated with this messagettl
- TTLpKey
- primary keyentries
- the entries for this messagepublic SrdiMessageImpl(PeerID peerid, int ttl, String pKey, String key, String value, long expiration)
peerid
- PeerID associated with this messagettl
- TTLpKey
- primary keykey
- the secondary keyvalue
- value for the keyexpiration
- expirations for this entrypublic SrdiMessageImpl(String peerid, int ttl, String pKey, List entries)
peerid
- PeerID associated with this messagettl
- TTLpKey
- primary keyentries
- the entries for this messageMethod Detail |
---|
public void readIt(XMLElement doc)
doc
- public Document getDocument(MimeMediaType encodeAs)
getDocument
in class SrdiMessage
encodeAs
-
public String toString()
toString
in class Object
|
JXTA J2SE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |