Class BuddyPluginBeta.ChatInstance
java.lang.Object
com.biglybt.plugin.net.buddy.BuddyPluginBeta.ChatInstance
- All Implemented Interfaces:
DataSourceResolver.ExportableDataSource
- Enclosing class:
BuddyPluginBeta
public class BuddyPluginBeta.ChatInstance
extends Object
implements DataSourceResolver.ExportableDataSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LinkedHashMap<String, String> private booleanprivate booleanprivate Objectprivate AESemaphoreprivate Objectprivate booleanprivate boolean(package private) AsyncDispatcherprivate Stringprivate booleanprivate Objectprivate booleanprivate booleanprivate Stringprivate intprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate final Stringprivate Stringprivate BuddyPluginBeta.ChatMessageprivate booleanprivate byte[]private ByteArrayHashMap<String> private booleanprivate AtomicIntegerprivate List<BuddyPluginBeta.ChatMessage> private intprivate static final intprivate PluginInterfaceprivate InetSocketAddressprivate byte[]private final Stringprivate Map<String, List<BuddyPluginBeta.ChatParticipant>> static final Stringprivate final BuddyPluginBeta.ChatParticipantprivate booleanprivate intprivate booleanprivate TimerEventprivate booleanprivate intFields inherited from interface DataSourceResolver.ExportableDataSource
OPT_CAN_MINIMIZE, OPT_ON_TOP -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateChatInstance(String _network, String _key, BuddyPluginBeta.ChatParticipant _private_target, boolean _is_private_chat, Map<String, Object> _options) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(BuddyPluginBeta.ChatListener listener) protected voidprotected voidbooleanprivate voidbind(PluginInterface _msgsync_pi, Object _handler, long timeout) chatRequested(Map<String, Object> message_map) private voidprivate voidvoiddestroy()private voiddestroy(boolean force) export()voidprivate List<BuddyPluginBeta.ChatMessage> flattenTree(BuddyPluginBeta.ChatMessage head, Map<BuddyPluginBeta.ChatMessage, Object> next_map, int num_messages) booleangetBooleanOption(int opt) getClone()booleanbooleanintprivate Objectbooleanint-ve -> state unknown 0 - synced +ve - number of messages pendingbooleangetKey()booleanintgetMessageCount(boolean not_mine) booleangetName()getName(boolean abbreviated) getNickname(boolean use_default) private booleanint-ve -> state unknown 0 - synced +ve - number of messages pendinggetParticipant(String nick) byte[]intbooleangetURL()getUserData(Object key) intvoidhandleDrop(String str) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisManagedFor(String network, String key) booleanbooleanbooleanbooleanisReadOnlyFor(String network, String key) booleanbooleanprivate List<BuddyPluginBeta.ChatMessage> merge(List<BuddyPluginBeta.ChatMessage> list1, List<BuddyPluginBeta.ChatMessage> list2) voidmessageReceived(Map<String, Object> message_map) private voidregisterNick(BuddyPluginBeta.ChatParticipant p, String old_nick, String new_nick) voidremove()voidremoveListener(BuddyPluginBeta.ChatListener listener) private BuddyPluginBeta.ChatParticipant(package private) voidvoidsendControlMessage(String cmd) voidsendLocalMessage(String message, String[] args, int message_type) voidsendMessage(Download download) voidsendMessage(String message, Map<String, Object> options) voidprivate voidvoidvoidsetAutoMute(boolean b) voidsetAutoNotify(boolean b) voidsetDisableNewMsgIndications(boolean b) voidsetDisplayName(String str) voidsetEnableNotificationsPost(boolean b) voidsetFavourite(boolean b) voidvoidsetInstanceNickname(String _nick) voidsetInteresting(boolean b) voidsetKeepAlive(boolean b) voidsetLogMessages(boolean b) voidvoidsetSaveMessages(boolean b) voidsetSharedNickname(boolean _shared) private voidsetSpammer(BuddyPluginBeta.ChatParticipant participant, boolean is_spammer) voidsetUserData(Object key, Object value) voidsetViewType(int t) private voidsortMessages(boolean force_change) private booleanprivate StringtrimMagnet(String magnet, int max) private voidunbind()private voidupdate()private voidupdated()protected voidprivate voidupdateOptions(Map<String, Object> options)
-
Field Details
-
OPT_INVISIBLE
- See Also:
-
MSG_HISTORY_MAX
private static final int MSG_HISTORY_MAX- See Also:
-
network
-
key
-
is_private_chat
private boolean is_private_chat -
is_invisible_chat
private boolean is_invisible_chat -
private_target
-
binding_lock
-
binding_sem
-
msgsync_pi
-
handler
-
my_public_key
private byte[] my_public_key -
managing_public_key
private byte[] managing_public_key -
read_only
private boolean read_only -
ipc_version
private int ipc_version -
my_address
-
chat_lock
-
message_uid_next
-
messages
-
message_ids
-
messages_not_mine_count
private int messages_not_mine_count -
participants
-
nick_clash_map
-
listeners
-
user_data
-
auto_dup_set
-
keep_alive
private boolean keep_alive -
have_interest
private boolean have_interest -
status
-
instance_nick
-
reference_count
private volatile int reference_count -
virtual_reference_count
private int virtual_reference_count -
last_message_requiring_attention
-
message_outstanding
private boolean message_outstanding -
is_favourite
private boolean is_favourite -
auto_notify
private boolean auto_notify -
save_messages
private boolean save_messages -
log_messages
private boolean log_messages -
auto_mute
private boolean auto_mute -
enable_notification_posts
private boolean enable_notification_posts -
disable_new_msg_indications
private boolean disable_new_msg_indications -
display_name
-
has_been_viewed
private boolean has_been_viewed -
last_bind_fail
-
destroyed
private volatile boolean destroyed -
sort_event
-
sort_force_changed
private boolean sort_force_changed -
dispatcher
AsyncDispatcher dispatcher
-
-
Constructor Details
-
ChatInstance
-
-
Method Details
-
getClone
- Throws:
Exception
-
exportDataSource
- Specified by:
exportDataSourcein interfaceDataSourceResolver.ExportableDataSource
-
getBooleanOption
- Specified by:
getBooleanOptionin interfaceDataSourceResolver.ExportableDataSource
-
addVirtualReference
protected void addVirtualReference() -
addReference
protected void addReference() -
getReferenceCount
public int getReferenceCount() -
getName
-
getName
-
getShortKey
-
getShortName
-
getNetwork
-
getKey
-
isFavourite
public boolean isFavourite() -
setAutoNotify
public void setAutoNotify(boolean b) -
isAutoNotify
public boolean isAutoNotify() -
isInteresting
public boolean isInteresting() -
setInteresting
public void setInteresting(boolean b) -
isStatistics
public boolean isStatistics() -
setFavourite
public void setFavourite(boolean b) -
setHasBeenViewed
public void setHasBeenViewed() -
getHasBeenViewed
public boolean getHasBeenViewed() -
getSaveMessages
public boolean getSaveMessages() -
setSaveMessages
public void setSaveMessages(boolean b) -
getLogMessages
public boolean getLogMessages() -
setLogMessages
public void setLogMessages(boolean b) -
getAutoMute
public boolean getAutoMute() -
setAutoMute
public void setAutoMute(boolean b) -
getViewType
public int getViewType() -
setViewType
public void setViewType(int t) -
getDisableNewMsgIndications
public boolean getDisableNewMsgIndications() -
setDisableNewMsgIndications
public void setDisableNewMsgIndications(boolean b) -
getEnableNotificationsPost
public boolean getEnableNotificationsPost() -
setEnableNotificationsPost
public void setEnableNotificationsPost(boolean b) -
getDisplayName
-
setDisplayName
-
getDisplayNameEx
-
setSpammer
-
isManaged
public boolean isManaged() -
amManager
public boolean amManager() -
isManagedFor
-
getManagedChannel
- Throws:
Exception
-
isReadOnlyFor
-
getReadOnlyChannel
- Throws:
Exception
-
isReadOnly
public boolean isReadOnly() -
getURL
-
getPublicKey
public byte[] getPublicKey() -
isInvisible
public boolean isInvisible() -
isPrivateChat
public boolean isPrivateChat() -
isAnonymous
public boolean isAnonymous() -
getNetAndKey
-
setKeepAlive
public void setKeepAlive(boolean b) -
getKeepAlive
public boolean getKeepAlive() -
getDefaultNickname
-
getInstanceNickname
-
setInstanceNickname
-
getNickname
-
getHandler
-
bind
- Throws:
Exception
-
checkRebind
private void checkRebind() -
updateOptions
-
unbind
private void unbind() -
isAvailable
public boolean isAvailable() -
getHistory
-
update
private void update() -
updated
private void updated() -
configChanged
private void configChanged() -
handleDrop
-
getEstimatedNodes
public int getEstimatedNodes() -
getMessageCount
public int getMessageCount(boolean not_mine) -
getIncomingSyncState
public int getIncomingSyncState()-ve -> state unknown 0 - synced +ve - number of messages pending- Returns:
-
getOutgoingSyncState
public int getOutgoingSyncState()-ve -> state unknown 0 - synced +ve - number of messages pending- Returns:
-
isInitialised
public boolean isInitialised() -
getStatus
-
sortMessages
private void sortMessages(boolean force_change) -
sortMessagesSupport
private boolean sortMessagesSupport() -
flattenTree
private List<BuddyPluginBeta.ChatMessage> flattenTree(BuddyPluginBeta.ChatMessage head, Map<BuddyPluginBeta.ChatMessage, Object> next_map, int num_messages) -
merge
private List<BuddyPluginBeta.ChatMessage> merge(List<BuddyPluginBeta.ChatMessage> list1, List<BuddyPluginBeta.ChatMessage> list2) -
messageReceived
- Throws:
IPCException
-
chatRequested
- Throws:
IPCException
-
sendMessage
-
resetIPFilters
void resetIPFilters() -
getMagnet
-
trimMagnet
-
sendMessage
-
sendMessage
-
sendRawMessage
-
sendLocalMessage
-
sendControlMessage
-
sendMessageSupport
-
export
-
getMessages
-
hasUnseenMessageWithNick
public boolean hasUnseenMessageWithNick() -
getUnseenMessages
-
getParticipants
-
getParticipant
-
removeParticipant
-
updated
-
registerNick
-
getOtherNickClashesHidden
-
getLastMessageRequiringAttention
-
setUserData
-
getUserData
-
getMessageOutstanding
public boolean getMessageOutstanding() -
setMessageOutstanding
-
isOldOutstandingMessage
-
fixupSeenState
-
getMyAddress
-
addListener
-
removeListener
-
remove
public void remove() -
isDestroyed
public boolean isDestroyed() -
destroy
public void destroy() -
destroy
private void destroy(boolean force)
-