public class ComTopic<DP extends TheCard> extends Topic<DP,PrivateType,DP,PrivateType>
Modifier and Type | Class and Description |
---|---|
static class |
ComTopic.ComListener<DP> |
Topic.Listener<DP,DR,SP,SR>, Topic.MetaGetBuilder, Topic.NoteType, Topic.TopicType
LocalData.Payload
Constructor and Description |
---|
ComTopic(Tinode tinode,
java.lang.String name,
Description<DP,PrivateType> desc) |
ComTopic(Tinode tinode,
java.lang.String name,
Topic.Listener<DP,PrivateType,DP,PrivateType> l) |
ComTopic(Tinode tinode,
Subscription<DP,PrivateType> sub) |
ComTopic(Tinode tinode,
Topic.Listener l,
boolean isChannel) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getComment()
Read comment from the Private field.
|
Subscription<DP,PrivateType> |
getPeer()
In P2P topics get peer's subscription.
|
boolean |
hasChannelAccess()
Checks if the topic can be accessed as channel.
|
boolean |
isArchived()
Checks if the topic is archived.
|
boolean |
isChannel()
Checks if the topic is archived.
|
static boolean |
isChannel(java.lang.String name)
Checks if given topic name is a name of a channel.
|
void |
setComment(java.lang.String comment) |
void |
setHasChannelAccess(boolean access)
Sets flag that the topic is accessible as a channel.
|
PromisedReply<ServerMessage> |
subscribe()
Subscribe to topic.
|
PromisedReply<ServerMessage> |
updateArchived(boolean arch)
Archive topic by issuing
Topic.setMeta(co.tinode.tinodesdk.model.MsgSetMeta<DP, DR>) with priv set to {arch: true/false}. |
addSubToCache, allMessagesReceived, allSubsReceived, compareTo, delete, delMessages, delMessages, delMessages, eject, expunge, getAccessMode, getAnonAcs, getAnonAcsStr, getAuthAcs, getAuthAcsStr, getCachedMessagesRange, getClear, getCreated, getDefacs, getLastSeen, getLastSeenUA, getLocal, getMaxDel, getMeta, getMetaGetBuilder, getMissingMessageRange, getName, getOnline, getPriv, getPub, getRead, getRecv, getSeq, getSubscription, getSubscriptions, getSubsUpdated, getTags, getTopicType, getTopicTypeByName, getTouched, getTrusted, getUnreadCount, getUpdated, invite, isApprover, 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, publish, publish, removeSubFromCache, routeData, routeInfo, routeMeta, routeMetaDel, routeMetaDesc, routeMetaSub, routeMetaTags, routePres, setAccessMode, setClear, setCreated, setDefacs, setDefacs, setDeleted, setDescription, setDescription, setLastSeen, setLastSeen, setListener, setLocal, setMaxDel, setMeta, setName, setOnline, setPriv, setPub, setRead, setReadRecvByRemote, setRecv, setSeq, setSeqAndFetch, setStorage, setSubscription, setTags, setTouched, setTrusted, setTypes, setTypes, setTypes, setUpdated, subscribe, syncAll, syncOne, topicLeft, update, update, update, update, update, update, updateAccessMode, updateAdmin, updateDefAcs, updateMode, updateMode, updateMuted, updateSharer
public ComTopic(Tinode tinode, Subscription<DP,PrivateType> sub)
public ComTopic(Tinode tinode, java.lang.String name, Description<DP,PrivateType> desc)
public ComTopic(Tinode tinode, java.lang.String name, Topic.Listener<DP,PrivateType,DP,PrivateType> l)
public ComTopic(Tinode tinode, Topic.Listener l, boolean isChannel)
public PromisedReply<ServerMessage> subscribe()
subscribe
in class Topic<DP extends TheCard,PrivateType,DP extends TheCard,PrivateType>
public void setComment(java.lang.String comment)
public java.lang.String getComment()
public boolean isArchived()
isArchived
in class Topic<DP extends TheCard,PrivateType,DP extends TheCard,PrivateType>
public boolean isChannel()
public static boolean isChannel(java.lang.String name)
name
- name to check.public boolean hasChannelAccess()
public void setHasChannelAccess(boolean access)
access
- true
to indicate that the topic is accessible as a channel.public Subscription<DP,PrivateType> getPeer()
public PromisedReply<ServerMessage> updateArchived(boolean arch)
Topic.setMeta(co.tinode.tinodesdk.model.MsgSetMeta<DP, DR>)
with priv set to {arch: true/false}.NotSubscribedException
- if the client is not subscribed to the topicNotConnectedException
- if there is no connection to the server