本文整理汇总了Java中org.whispersystems.signalservice.api.SignalServiceMessagePipe类的典型用法代码示例。如果您正苦于以下问题:Java SignalServiceMessagePipe类的具体用法?Java SignalServiceMessagePipe怎么用?Java SignalServiceMessagePipe使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SignalServiceMessagePipe类属于org.whispersystems.signalservice.api包,在下文中一共展示了SignalServiceMessagePipe类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendSyncMessage
import org.whispersystems.signalservice.api.SignalServiceMessagePipe; //导入依赖的package包/类
private void sendSyncMessage(SignalServiceSyncMessage message)
throws IOException, UntrustedIdentityException {
SignalServiceMessageSender messageSender = new SignalServiceMessageSender(serviceUrls, localIdentity.getToshiId(), localIdentity.getPassword(), signalProtocolStore, USER_AGENT, Optional.<SignalServiceMessagePipe>absent(), Optional.<SignalServiceMessageSender.EventListener>absent());
try {
messageSender.sendMessage(message);
} catch (UntrustedIdentityException e) {
// TODO: save that this is untrusted?
throw e;
}
}
示例2: shutdown
import org.whispersystems.signalservice.api.SignalServiceMessagePipe; //导入依赖的package包/类
private void shutdown(SignalServiceMessagePipe pipe) {
try {
pipe.shutdown();
} catch (Throwable t) {
Log.w(TAG, t);
}
}
示例3: retrieveProfile
import org.whispersystems.signalservice.api.SignalServiceMessagePipe; //导入依赖的package包/类
private SignalServiceProfile retrieveProfile(@NonNull String number) throws IOException {
SignalServiceMessagePipe pipe = MessageRetrievalService.getPipe();
if (pipe != null) {
try {
return pipe.getProfile(new SignalServiceAddress(number));
} catch (IOException e) {
Log.w(TAG, e);
}
}
return receiver.retrieveProfile(new SignalServiceAddress(number));
}
示例4: getPipe
import org.whispersystems.signalservice.api.SignalServiceMessagePipe; //导入依赖的package包/类
public static @Nullable SignalServiceMessagePipe getPipe() {
return pipe;
}