public class LCIMOptions extends Object
Modifier and Type | Method and Description |
---|---|
static LCIMOptions |
getGlobalOptions()
get global options instance.
|
String |
getRtmServer()
get rtm connection server.
|
SignatureFactory |
getSignatureFactory()
get signature factory
|
SystemReporter |
getSystemReporter() |
int |
getTimeoutInSecs()
get timeout option.
|
boolean |
isAlwaysRetrieveAllNotification() |
boolean |
isAutoOpen() |
boolean |
isDisableAutoLogin4Push() |
boolean |
isMessageQueryCacheEnabled() |
boolean |
isOnlyPushCount()
是否被设置为离线消息仅推送数量
|
boolean |
isResetConnectionWhileBroken()
Deprecated.
Since 5.0.18
|
boolean |
isWrapMessageBinaryBufferAsString() |
void |
setAlwaysRetrieveAllNotification(boolean alwaysRetrieveAllNotification)
在 session/open 的时候是否总是获取全部未读消息通知
1,如果不是每次都获取全部的未读消息通知(默认方式),那么应用层需要缓存之前收到的通知数据;
2,如果强制每次都获取全部的未读消息通知,由于 LeanCloud 即时通讯云端最多缓存 50 个对话的未读消息通知,所以应用层也还是应该缓存之前收到
的通知数据(如果业务层面保证一个人不会拥有超过 50 个对话,则可以不必缓存)。
|
void |
setAutoOpen(boolean autoOpen) |
void |
setDisableAutoLogin4Push(boolean disableAutoLogin4Push)
设置是否禁止推送服务的自动 login 请求
对于部分应用来说,如果不使用 LeanCloud 推送服务,仅仅只使用了即时通讯服务的话,可以将这个标志设为 true,以避免不必要的网络连接。
|
void |
setMessageQueryCacheEnabled(boolean messageQueryCacheEnabled) |
void |
setResetConnectionWhileBroken(boolean resetConnectionWhileBroken)
Deprecated.
Since 5.0.18
|
void |
setRtmServer(String server)
set rtm connection server.
|
void |
setSignatureFactory(SignatureFactory factory)
set signature factory.
|
void |
setSystemReporter(SystemReporter reporter) |
void |
setTimeoutInSecs(int timeoutInSecs)
set timeout option.
|
void |
setUnreadNotificationEnabled(boolean isOnlyCount)
设置离线消息推送模式
|
public static LCIMOptions getGlobalOptions()
public void setRtmServer(String server)
server
- rtm connection server.public String getRtmServer()
public SignatureFactory getSignatureFactory()
public void setSignatureFactory(SignatureFactory factory)
factory
- signature factory.public int getTimeoutInSecs()
public void setTimeoutInSecs(int timeoutInSecs)
timeoutInSecs
- timeout valuepublic boolean isWrapMessageBinaryBufferAsString()
public boolean isAutoOpen()
public void setAutoOpen(boolean autoOpen)
public boolean isMessageQueryCacheEnabled()
public void setMessageQueryCacheEnabled(boolean messageQueryCacheEnabled)
public boolean isAlwaysRetrieveAllNotification()
public void setAlwaysRetrieveAllNotification(boolean alwaysRetrieveAllNotification)
alwaysRetrieveAllNotification
- 强制总是获取public boolean isDisableAutoLogin4Push()
public void setDisableAutoLogin4Push(boolean disableAutoLogin4Push)
disableAutoLogin4Push
- disable flagpublic SystemReporter getSystemReporter()
public void setSystemReporter(SystemReporter reporter)
public void setUnreadNotificationEnabled(boolean isOnlyCount)
isOnlyCount
- flag indicates only push count or notpublic boolean isOnlyPushCount()
public boolean isResetConnectionWhileBroken()
public void setResetConnectionWhileBroken(boolean resetConnectionWhileBroken)
resetConnectionWhileBroken
- flag indicating reset connection while broken or not.Copyright © 2020, 美味书签(北京)信息技术有限公司 All rights reserved.