|
Project JXTA | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.protocol.SrdiMessage
A generic message that can be used by services to push shared resources to other peers on the network
Nested Class Summary | |
static class |
SrdiMessage.Entry
Entries object, which describes each entry described by this message |
Constructor Summary | |
SrdiMessage()
|
Method Summary | |
void |
addEntry(SrdiMessage.Entry entry)
|
void |
addEntry(String key,
String value,
long expiration)
|
void |
decrementTTL()
decrements ttl |
abstract Document |
getDocument(MimeMediaType asMimeType)
Write advertisement into a document. asMimeType is a mime media-type specification and provides the form of the document which is being requested. |
Collection |
getEntries()
returns the entries of this SrdiMessage |
static String |
getMessageType()
All messages have a type (in xml this is ! |
PeerID |
getPeerID()
returns the source peerid |
String |
getPrimaryKey()
get the primary key |
int |
getTTL()
returns the ttl |
void |
setEntries(Collection newEntries)
set the Entries |
void |
setPeerID(PeerID peerid)
set the source peerid |
void |
setPrimaryKey(String pkey)
set the primary key |
void |
setTTL(int newTTL)
sets the ttl |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SrdiMessage()
Method Detail |
public abstract Document getDocument(MimeMediaType asMimeType)
asMimeType
- mime-type requested representation for the returned
document
public PeerID getPeerID()
public String getPrimaryKey()
public int getTTL()
public void setTTL(int newTTL)
public void decrementTTL()
public Collection getEntries()
public void addEntry(String key, String value, long expiration)
public void addEntry(SrdiMessage.Entry entry)
public void setEntries(Collection newEntries)
public void setPeerID(PeerID peerid)
peerid
- the source PeerIDpublic void setPrimaryKey(String pkey)
pkey
- the primary keypublic static String getMessageType()
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |