org.whispersystems.signalservice.api.SignalServiceMessagePipe Java Examples

The following examples show how to use org.whispersystems.signalservice.api.SignalServiceMessagePipe. 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 File: Manager.java    From signal-cli with 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
Source File: IncomingMessageObserver.java    From mollyim-android with GNU General Public License v3.0 5 votes vote down vote up
private void shutdown(SignalServiceMessagePipe pipe, SignalServiceMessagePipe unidentifiedPipe) {
  try {
    pipe.shutdown();
    unidentifiedPipe.shutdown();
  } catch (Throwable t) {
    Log.w(TAG, t);
  }
}
 
Example #3
Source File: IncomingMessageObserver.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
public static @Nullable SignalServiceMessagePipe getPipe() {
  return pipe;
}
 
Example #4
Source File: IncomingMessageObserver.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
public static @Nullable SignalServiceMessagePipe getUnidentifiedPipe() {
  return unidentifiedPipe;
}