org.whispersystems.signalservice.api.websocket.ConnectivityListener Java Examples
The following examples show how to use
org.whispersystems.signalservice.api.websocket.ConnectivityListener.
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: SignalServiceMessageReceiver.java From mollyim-android with GNU General Public License v3.0 | 6 votes |
/** * Construct a SignalServiceMessageReceiver. * * @param urls The URL of the Signal Service. * @param credentials The Signal Service user's credentials. */ public SignalServiceMessageReceiver(SignalServiceConfiguration urls, CredentialsProvider credentials, String signalAgent, ConnectivityListener listener, SleepTimer timer, ClientZkProfileOperations clientZkProfileOperations) { this.urls = urls; this.credentialsProvider = credentials; this.socket = new PushServiceSocket(urls, credentials, signalAgent, clientZkProfileOperations); this.signalAgent = signalAgent; this.connectivityListener = listener; this.sleepTimer = timer; this.clientZkProfileOperations = clientZkProfileOperations; }
Example #2
Source File: WebSocketConnection.java From mollyim-android with GNU General Public License v3.0 | 6 votes |
public WebSocketConnection(String httpUri, TrustStore trustStore, Optional<CredentialsProvider> credentialsProvider, String signalAgent, ConnectivityListener listener, SleepTimer timer, List<Interceptor> interceptors, Optional<Dns> dns) { this.trustStore = trustStore; this.credentialsProvider = credentialsProvider; this.signalAgent = signalAgent; this.listener = listener; this.sleepTimer = timer; this.interceptors = interceptors; this.dns = dns; this.attempts = 0; this.connected = false; String uri = httpUri.replace("https://", "wss://").replace("http://", "ws://"); if (credentialsProvider.isPresent()) this.wsUri = uri + "/v1/websocket/?login=%s&password=%s"; else this.wsUri = uri + "/v1/websocket/"; }
Example #3
Source File: WebSocketConnection.java From libsignal-service-java with GNU General Public License v3.0 | 6 votes |
public WebSocketConnection(String httpUri, TrustStore trustStore, Optional<CredentialsProvider> credentialsProvider, String userAgent, ConnectivityListener listener, SleepTimer timer) { this.trustStore = trustStore; this.credentialsProvider = credentialsProvider; this.userAgent = userAgent; this.listener = listener; this.sleepTimer = timer; this.attempts = 0; this.connected = false; String uri = httpUri.replace("https://", "wss://").replace("http://", "ws://"); if (credentialsProvider.isPresent()) this.wsUri = uri + "/v1/websocket/?login=%s&password=%s"; else this.wsUri = uri + "/v1/websocket/"; }
Example #4
Source File: SignalServiceMessageReceiver.java From mollyim-android with GNU General Public License v3.0 | 5 votes |
/** * Construct a SignalServiceMessageReceiver. * * @param urls The URL of the Signal Service. * @param uuid The Signal Service UUID. * @param e164 The Signal Service phone number. * @param password The Signal Service user password. * @param signalingKey The 52 byte signaling key assigned to this user at registration. */ public SignalServiceMessageReceiver(SignalServiceConfiguration urls, UUID uuid, String e164, String password, String signalingKey, String signalAgent, ConnectivityListener listener, SleepTimer timer, ClientZkProfileOperations clientZkProfileOperations) { this(urls, new StaticCredentialsProvider(uuid, e164, password, signalingKey), signalAgent, listener, timer, clientZkProfileOperations); }
Example #5
Source File: SignalServiceMessageReceiver.java From libsignal-service-java with GNU General Public License v3.0 | 5 votes |
/** * Construct a SignalServiceMessageReceiver. * * @param urls The URL of the Signal Service. * @param credentials The Signal Service user's credentials. */ public SignalServiceMessageReceiver(SignalServiceConfiguration urls, CredentialsProvider credentials, String userAgent, ConnectivityListener listener, SleepTimer timer) { this.urls = urls; this.credentialsProvider = credentials; this.socket = new PushServiceSocket(urls, credentials, userAgent); this.userAgent = userAgent; this.connectivityListener = listener; this.sleepTimer = timer; }
Example #6
Source File: SignalServiceMessageReceiver.java From libsignal-service-java with GNU General Public License v3.0 | 3 votes |
/** * Construct a SignalServiceMessageReceiver. * * @param urls The URL of the Signal Service. * @param uuid The Signal Service UUID. * @param e164 The Signal Service phone number. * @param password The Signal Service user password. * @param signalingKey The 52 byte signaling key assigned to this user at registration. */ public SignalServiceMessageReceiver(SignalServiceConfiguration urls, UUID uuid, String e164, String password, String signalingKey, String userAgent, ConnectivityListener listener, SleepTimer timer) { this(urls, new StaticCredentialsProvider(uuid, e164, password, signalingKey), userAgent, listener, timer); }