public class MeTopic<DP> extends Topic<DP,PrivateType,DP,PrivateType>
| Modifier and Type | Class and Description |
|---|---|
static class |
MeTopic.MeListener<DP> |
static class |
MeTopic.MetaGetBuilder |
Topic.Listener<DP,DR,SP,SR>, Topic.NoteType, Topic.TopicTypeLocalData.Payload| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<Credential> |
mCreds |
| Modifier | Constructor and Description |
|---|---|
protected |
MeTopic(Tinode tinode,
Description<DP,PrivateType> desc) |
|
MeTopic(Tinode tinode,
Topic.Listener<DP,PrivateType,DP,PrivateType> l) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSubToCache(Subscription<DP,PrivateType> sub)
Add subscription to cache.
|
PromisedReply<ServerMessage> |
confirmCred(java.lang.String meth,
java.lang.String resp) |
PromisedReply<ServerMessage> |
delCredential(java.lang.String meth,
java.lang.String val)
Delete credential.
|
Credential[] |
getCreds()
Get current user's credentials, such as emails and phone numbers.
|
MeTopic.MetaGetBuilder |
getMetaGetBuilder() |
PrivateType |
getPriv() |
Subscription |
getSubscription(java.lang.String key) |
java.util.Collection<Subscription<DP,PrivateType>> |
getSubscriptions() |
java.util.Date |
getSubsUpdated()
Get timestamp of the latest update to subscriptions.
|
PromisedReply<ServerMessage> |
publish(Drafty content)
Publish message to a topic.
|
PromisedReply<ServerMessage> |
publish(java.lang.String content)
Convenience method for plain text messages.
|
protected void |
removeSubFromCache(Subscription sub)
Remove subscription to cache.
|
protected void |
routeInfo(MsgServerInfo info) |
protected void |
routeMeta(MsgServerMeta<DP,PrivateType,DP,PrivateType> meta) |
protected void |
routeMetaCred(Credential cred) |
protected void |
routeMetaCred(Credential[] creds) |
protected void |
routeMetaSub(MsgServerMeta<DP,PrivateType,DP,PrivateType> meta) |
protected void |
routePres(MsgServerPres pres) |
void |
setCreds(Credential[] creds) |
void |
setPriv(PrivateType priv) |
void |
setTypes(com.fasterxml.jackson.databind.JavaType typeOfPu) |
protected void |
topicLeft(boolean unsub,
int code,
java.lang.String reason)
Called when the topic receives leave() confirmation.
|
protected void |
update(java.util.Map<java.lang.String,java.lang.Object> params,
MetaSetSub sSub)
Topic sent an update to subscription, got a confirmation.
|
protected void |
update(MsgServerCtrl ctrl,
MsgSetMeta<DP,PrivateType> meta)
Topic sent an update to description or subscription, got a confirmation, now
update local data with the new info.
|
PromisedReply<ServerMessage> |
updateMode(java.lang.String update)
Update own access mode.
|
allMessagesReceived, allSubsReceived, compareTo, delete, delMessages, delMessages, delMessages, eject, expunge, getAccessMode, getAnonAcs, getAnonAcsStr, getAuthAcs, getAuthAcsStr, getCachedMessagesRange, getClear, getCreated, getDefacs, getLastSeen, getLastSeenUA, getLocal, getMaxDel, getMeta, getMissingMessageRange, getName, getOnline, getPub, getRead, getRecv, getSeq, getTags, getTopicType, getTopicTypeByName, getTouched, getTrusted, getUnreadCount, getUpdated, invite, isApprover, isArchived, isAttached, isBlocked, isDeleted, isDeleter, isFndType, isGrpType, isGrpType, isJoiner, isManager, isMeType, isMuted, isNew, isNew, isOwner, isP2PType, isP2PType, isPersisted, isReader, isSharer, isTrusted, isTrustedDanger, isTrustedStaff, isTrustedVerified, isUserType, isValid, isWriter, leave, leave, loadSubs, msgReadCount, msgRecvCount, noteKeyPress, noteRead, noteRead, noteRead, noteReadRecv, noteRecv, noteRecv, persist, processSub, publish, publish, routeData, routeMetaDel, routeMetaDesc, routeMetaTags, setAccessMode, setClear, setCreated, setDefacs, setDefacs, setDeleted, setDescription, setDescription, setLastSeen, setLastSeen, setListener, setLocal, setMaxDel, setMeta, setName, setOnline, setPub, setRead, setReadRecvByRemote, setRecv, setSeq, setSeqAndFetch, setStorage, setSubscription, setTags, setTouched, setTrusted, setTypes, setTypes, setTypes, setUpdated, subscribe, subscribe, syncAll, syncOne, update, update, update, update, updateAccessMode, updateAdmin, updateDefAcs, updateMode, updateMuted, updateSharerprotected java.util.ArrayList<Credential> mCreds
public MeTopic(Tinode tinode, Topic.Listener<DP,PrivateType,DP,PrivateType> l)
protected MeTopic(Tinode tinode, Description<DP,PrivateType> desc)
public void setTypes(com.fasterxml.jackson.databind.JavaType typeOfPu)
protected void addSubToCache(Subscription<DP,PrivateType> sub)
TopicaddSubToCache in class Topic<DP,PrivateType,DP,PrivateType>sub - subscription to add to cacheprotected void removeSubFromCache(Subscription sub)
TopicremoveSubFromCache in class Topic<DP,PrivateType,DP,PrivateType>sub - subscription to remove from cachepublic PromisedReply<ServerMessage> publish(Drafty content)
Topicpublish in class Topic<DP,PrivateType,DP,PrivateType>content - payloadpublic PromisedReply<ServerMessage> publish(java.lang.String content)
Topicpublish in class Topic<DP,PrivateType,DP,PrivateType>content - message to sendpublic Subscription getSubscription(java.lang.String key)
getSubscription in class Topic<DP,PrivateType,DP,PrivateType>public java.util.Collection<Subscription<DP,PrivateType>> getSubscriptions()
getSubscriptions in class Topic<DP,PrivateType,DP,PrivateType>public PrivateType getPriv()
getPriv in class Topic<DP,PrivateType,DP,PrivateType>public void setPriv(PrivateType priv)
setPriv in class Topic<DP,PrivateType,DP,PrivateType>public java.util.Date getSubsUpdated()
TopicgetSubsUpdated in class Topic<DP,PrivateType,DP,PrivateType>public Credential[] getCreds()
public void setCreds(Credential[] creds)
public PromisedReply<ServerMessage> delCredential(java.lang.String meth, java.lang.String val)
meth - credential method (i.e. "tel" or "email").val - value of the credential being deleted, i.e. "alice@example.com".public PromisedReply<ServerMessage> confirmCred(java.lang.String meth, java.lang.String resp)
public PromisedReply<ServerMessage> updateMode(java.lang.String update)
TopicupdateMode in class Topic<DP,PrivateType,DP,PrivateType>update - string which defines the update. It could be a full value or a change.protected void update(java.util.Map<java.lang.String,java.lang.Object> params,
MetaSetSub sSub)
update in class Topic<DP,PrivateType,DP,PrivateType>params - {ctrl} parameters returned by the server (could be null).sSub - updated topic parameters.protected void update(MsgServerCtrl ctrl, MsgSetMeta<DP,PrivateType> meta)
update in class Topic<DP,PrivateType,DP,PrivateType>ctrl - {ctrl} packet sent by the servermeta - original {meta} packet updated topic parametersprotected void routeMeta(MsgServerMeta<DP,PrivateType,DP,PrivateType> meta)
routeMeta in class Topic<DP,PrivateType,DP,PrivateType>protected void routeMetaSub(MsgServerMeta<DP,PrivateType,DP,PrivateType> meta)
routeMetaSub in class Topic<DP,PrivateType,DP,PrivateType>protected void routeMetaCred(Credential cred)
protected void routeMetaCred(Credential[] creds)
protected void routePres(MsgServerPres pres)
routePres in class Topic<DP,PrivateType,DP,PrivateType>protected void routeInfo(MsgServerInfo info)
routeInfo in class Topic<DP,PrivateType,DP,PrivateType>protected void topicLeft(boolean unsub,
int code,
java.lang.String reason)
TopictopicLeft in class Topic<DP,PrivateType,DP,PrivateType>unsub - - not just detached but also unsubscribedcode - result code, always 200reason - usually "OK"public MeTopic.MetaGetBuilder getMetaGetBuilder()
getMetaGetBuilder in class Topic<DP,PrivateType,DP,PrivateType>