当前位置: 首页>>代码示例>>Java>>正文


Java SignalServiceConfiguration类代码示例

本文整理汇总了Java中org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration的典型用法代码示例。如果您正苦于以下问题:Java SignalServiceConfiguration类的具体用法?Java SignalServiceConfiguration怎么用?Java SignalServiceConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SignalServiceConfiguration类属于org.whispersystems.signalservice.internal.configuration包,在下文中一共展示了SignalServiceConfiguration类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SofaMessageReceiver

import org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration; //导入依赖的package包/类
public SofaMessageReceiver(@NonNull final HDWallet wallet,
                           @NonNull final ProtocolStore protocolStore,
                           @NonNull final ConversationStore conversationStore,
                           @NonNull final SignalServiceUrl[] urls,
                           @NonNull final SofaMessageSender messageSender) {
    this.wallet = wallet;
    this.protocolStore = protocolStore;
    this.messageReceiver =
            new SignalServiceMessageReceiver(
                    new SignalServiceConfiguration(urls, new SignalCdnUrl[0]),
                    this.wallet.getOwnerAddress(),
                    this.protocolStore.getPassword(),
                    this.protocolStore.getSignalingKey(),
                    USER_AGENT);

    this.taskGroupUpdate = new GroupUpdateTask(this.messageReceiver, messageSender, conversationStore);
    this.taskHandleMessage = new HandleMessageTask(this.messageReceiver, conversationStore, this.wallet, messageSender);
}
 
开发者ID:toshiapp,项目名称:toshi-android-client,代码行数:19,代码来源:SofaMessageReceiver.java

示例2: SofaMessageSender

import org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration; //导入依赖的package包/类
public SofaMessageSender(@NonNull final HDWallet wallet,
                         @NonNull final ProtocolStore protocolStore,
                         @NonNull final ConversationStore conversationStore,
                         @NonNull final SignalServiceUrl[] urls) {
    this.conversationStore = conversationStore;
    this.messageQueue = PublishSubject.create();
    this.pendingMessageStore = new PendingMessageStore();
    this.protocolStore = protocolStore;
    this.subscriptions = new CompositeSubscription();
    this.wallet = wallet;

    this.signalMessageSender =
            new SignalServiceMessageSender(
                    new SignalServiceConfiguration(urls, new SignalCdnUrl[0]),
                    this.wallet.getOwnerAddress(),
                    this.protocolStore.getPassword(),
                    this.protocolStore,
                    USER_AGENT,
                    Optional.absent(),
                    Optional.absent()
            );

    this.taskSendMessage = new SendMessageToRecipientTask(
            this.conversationStore,
            this.pendingMessageStore,
            this.protocolStore,
            this.signalMessageSender);
    this.taskStoreMessage = new StoreMessageTask(this.conversationStore);

    attachSubscriber();
}
 
开发者ID:toshiapp,项目名称:toshi-android-client,代码行数:32,代码来源:SofaMessageSender.java

示例3: ChatService

import org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration; //导入依赖的package包/类
private ChatService(final SignalServiceUrl[] urls,
                    final String user,
                    final String password,
                    final String userAgent) {
    super(new SignalServiceConfiguration(urls, new SignalCdnUrl[0]),
            user,
            password,
            userAgent);
    this.url = urls[0].getUrl();
    this.client = new OkHttpClient.Builder();
    this.chatInterface = generateSignalInterface();
}
 
开发者ID:toshiapp,项目名称:toshi-android-client,代码行数:13,代码来源:ChatService.java


注:本文中的org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。