public class PushServiceSocket
extends java.lang.Object
| Constructor and Description |
|---|
PushServiceSocket(java.lang.String serviceUrl,
TrustStore trustStore,
CredentialsProvider credentialsProvider,
java.lang.String userAgent) |
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledgeMessage(java.lang.String sender,
long timestamp) |
void |
createAccount(boolean voice) |
java.lang.String |
getAccountVerificationToken() |
int |
getAvailablePreKeys() |
ContactTokenDetails |
getContactTokenDetails(java.lang.String contactToken) |
SignedPreKeyEntity |
getCurrentSignedPreKey() |
java.util.List<DeviceInfo> |
getDevices() |
java.util.List<SignalServiceEnvelopeEntity> |
getMessages() |
java.lang.String |
getNewDeviceVerificationCode() |
org.whispersystems.libsignal.state.PreKeyBundle |
getPreKey(SignalServiceAddress destination,
int deviceId) |
java.util.List<org.whispersystems.libsignal.state.PreKeyBundle> |
getPreKeys(SignalServiceAddress destination,
int deviceIdInteger) |
void |
registerGcmId(java.lang.String gcmRegistrationId) |
void |
registerPreKeys(org.whispersystems.libsignal.IdentityKey identityKey,
org.whispersystems.libsignal.state.PreKeyRecord lastResortKey,
org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKey,
java.util.List<org.whispersystems.libsignal.state.PreKeyRecord> records) |
void |
removeDevice(long deviceId) |
void |
retrieveAttachment(java.lang.String relay,
long attachmentId,
java.io.File destination,
SignalServiceAttachment.ProgressListener listener) |
java.util.List<ContactTokenDetails> |
retrieveDirectory(java.util.Set<java.lang.String> contactTokens) |
long |
sendAttachment(PushAttachmentData attachment) |
SendMessageResponse |
sendMessage(OutgoingPushMessageList bundle) |
void |
sendProvisioningMessage(java.lang.String destination,
byte[] body) |
void |
sendReceipt(java.lang.String destination,
long messageId,
org.whispersystems.libsignal.util.guava.Optional<java.lang.String> relay) |
void |
setAccountAttributes(java.lang.String signalingKey,
int registrationId,
boolean voice) |
void |
setCurrentSignedPreKey(org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKey) |
void |
unregisterGcmId() |
void |
verifyAccountCode(java.lang.String verificationCode,
java.lang.String signalingKey,
int registrationId,
boolean voice) |
void |
verifyAccountToken(java.lang.String verificationToken,
java.lang.String signalingKey,
int registrationId,
boolean voice) |
public PushServiceSocket(java.lang.String serviceUrl,
TrustStore trustStore,
CredentialsProvider credentialsProvider,
java.lang.String userAgent)
public void createAccount(boolean voice)
throws java.io.IOException
java.io.IOExceptionpublic void verifyAccountCode(java.lang.String verificationCode,
java.lang.String signalingKey,
int registrationId,
boolean voice)
throws java.io.IOException
java.io.IOExceptionpublic void verifyAccountToken(java.lang.String verificationToken,
java.lang.String signalingKey,
int registrationId,
boolean voice)
throws java.io.IOException
java.io.IOExceptionpublic void setAccountAttributes(java.lang.String signalingKey,
int registrationId,
boolean voice)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getAccountVerificationToken()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getNewDeviceVerificationCode()
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<DeviceInfo> getDevices() throws java.io.IOException
java.io.IOExceptionpublic void removeDevice(long deviceId)
throws java.io.IOException
java.io.IOExceptionpublic void sendProvisioningMessage(java.lang.String destination,
byte[] body)
throws java.io.IOException
java.io.IOExceptionpublic void sendReceipt(java.lang.String destination,
long messageId,
org.whispersystems.libsignal.util.guava.Optional<java.lang.String> relay)
throws java.io.IOException
java.io.IOExceptionpublic void registerGcmId(java.lang.String gcmRegistrationId)
throws java.io.IOException
java.io.IOExceptionpublic void unregisterGcmId()
throws java.io.IOException
java.io.IOExceptionpublic SendMessageResponse sendMessage(OutgoingPushMessageList bundle) throws java.io.IOException
java.io.IOExceptionpublic java.util.List<SignalServiceEnvelopeEntity> getMessages() throws java.io.IOException
java.io.IOExceptionpublic void acknowledgeMessage(java.lang.String sender,
long timestamp)
throws java.io.IOException
java.io.IOExceptionpublic void registerPreKeys(org.whispersystems.libsignal.IdentityKey identityKey,
org.whispersystems.libsignal.state.PreKeyRecord lastResortKey,
org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKey,
java.util.List<org.whispersystems.libsignal.state.PreKeyRecord> records)
throws java.io.IOException
java.io.IOExceptionpublic int getAvailablePreKeys()
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<org.whispersystems.libsignal.state.PreKeyBundle> getPreKeys(SignalServiceAddress destination, int deviceIdInteger) throws java.io.IOException
java.io.IOExceptionpublic org.whispersystems.libsignal.state.PreKeyBundle getPreKey(SignalServiceAddress destination, int deviceId) throws java.io.IOException
java.io.IOExceptionpublic SignedPreKeyEntity getCurrentSignedPreKey() throws java.io.IOException
java.io.IOExceptionpublic void setCurrentSignedPreKey(org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKey)
throws java.io.IOException
java.io.IOExceptionpublic long sendAttachment(PushAttachmentData attachment) throws java.io.IOException
java.io.IOExceptionpublic void retrieveAttachment(java.lang.String relay,
long attachmentId,
java.io.File destination,
SignalServiceAttachment.ProgressListener listener)
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<ContactTokenDetails> retrieveDirectory(java.util.Set<java.lang.String> contactTokens) throws NonSuccessfulResponseCodeException, PushNetworkException
public ContactTokenDetails getContactTokenDetails(java.lang.String contactToken) throws java.io.IOException
java.io.IOException