Java Code Examples for org.whispersystems.signalservice.api.SignalServiceMessagePipe

The following examples show how to use org.whispersystems.signalservice.api.SignalServiceMessagePipe. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: signal-cli   Source File:    License: GNU General Public License v3.0 6 votes vote down vote up
private SignalServiceProfile getRecipientProfile(SignalServiceAddress address, Optional<UnidentifiedAccess> unidentifiedAccess) throws IOException {
    SignalServiceMessagePipe pipe = unidentifiedMessagePipe != null && unidentifiedAccess.isPresent() ? unidentifiedMessagePipe
            : messagePipe;

    if (pipe != null) {
        try {
            return pipe.getProfile(address, Optional.absent(), unidentifiedAccess, SignalServiceProfile.RequestType.PROFILE).getProfile();
        } catch (IOException ignored) {

    SignalServiceMessageReceiver receiver = getMessageReceiver();
    try {
        return receiver.retrieveProfile(address, Optional.absent(), unidentifiedAccess, SignalServiceProfile.RequestType.PROFILE).getProfile();
    } catch (VerificationFailedException e) {
        throw new AssertionError(e);
Example 2
private void shutdown(SignalServiceMessagePipe pipe, SignalServiceMessagePipe unidentifiedPipe) {
  try {
  } catch (Throwable t) {
    Log.w(TAG, t);
Example 3
public static @Nullable SignalServiceMessagePipe getPipe() {
  return pipe;
Example 4
public static @Nullable SignalServiceMessagePipe getUnidentifiedPipe() {
  return unidentifiedPipe;