|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.protocol.SrdiMessage
public abstract class 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 |
Field Summary | |
---|---|
static int |
PERSISTONLY
PERSIST Scope is persist only. i.e. |
static int |
REPLICATE
REPLICATE Scope is persist and replicate. i.e. |
Constructor Summary | |
---|---|
SrdiMessage()
|
Method Summary | |
---|---|
void |
addEntry(SrdiMessage.Entry entry)
|
void |
addEntry(String key,
String value,
long expiration)
Adds an index entry |
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<SrdiMessage.Entry> |
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 |
getScope()
Returns the current scope of this message. |
int |
getTTL()
Deprecated. ttl is a misnomer, it is meant to be defined as scope. use #getScope() instead |
void |
setEntries(Collection<SrdiMessage.Entry> newEntries)
Set the Entries for this SrdiMessage. |
void |
setPeerID(PeerID peerid)
Set the source peerid |
void |
setPrimaryKey(String pkey)
Set the primary key |
void |
setScope(int scope)
Sets the current scope of this message. |
void |
setTTL(int newTTL)
Deprecated. ttl is a misnomer, it is meant to be defined as scope. use #setScope() instead |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PERSISTONLY
public static final int REPLICATE
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()
@Deprecated public int getTTL()
@Deprecated public void setTTL(int newTTL)
newTTL
- The new TTL value.public int getScope()
public void setScope(int scope)
scope
- The new TTL value.PERSISTONLY
,
REPLICATE
public void decrementTTL()
public Collection<SrdiMessage.Entry> getEntries()
public void addEntry(String key, String value, long expiration)
key
- keyvalue
- the valueexpiration
- expiration in milliscondspublic void addEntry(SrdiMessage.Entry entry)
public void setEntries(Collection<SrdiMessage.Entry> newEntries)
newEntries
- The entries to be included in this message.public void setPeerID(PeerID peerid)
peerid
- the source PeerIDpublic void setPrimaryKey(String pkey)
pkey
- the primary keypublic static String getMessageType()
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |