public class RelayService
extends java.lang.Object
| Constructor and Description |
|---|
RelayService() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createEndPoint(ClientIdentity identity,
java.lang.String name,
OnCompleteListener<EndpointResult> completedCallback,
java.lang.Object state)
Helper method to initiate the call that creates an endpoint.
|
static void |
createGroup(ClientIdentity identity,
int timeoutInSeconds,
OnCompleteListener<GroupResult> completedCallback,
java.lang.Object state)
Helper method to initiate the call that creates a new group.
|
static void |
deleteEndPoint(ClientIdentity identity,
java.lang.String registrationId,
java.lang.String secretKey,
OnCompleteListener<EndpointResult> completedCallback,
java.lang.Object state)
Helper method to initiate the call that deletes an endpoint.
|
static void |
deleteGroup(ClientIdentity identity,
java.lang.String registrationId,
java.lang.String secretKey,
OnCompleteListener<GroupResult> completedCallback,
java.lang.Object state)
Helper method to initiate the call that deletes a group.
|
static void |
joinGroup(ClientIdentity identity,
java.lang.String groupRegistrationId,
java.lang.String endpointRegistrationId,
java.lang.String secretKey,
OnCompleteListener<GroupResult> completedCallback,
java.lang.Object state)
Helper method to initiate the call that will join an endpoint to a group.
|
static void |
leaveGroup(ClientIdentity identity,
java.lang.String groupRegistrationId,
java.lang.String endpointRegistrationId,
java.lang.String secretKey,
OnCompleteListener<GroupResult> completedCallback,
java.lang.Object state)
Helper method to initiate the call that will have an endpoint leave from
a group.
|
static void |
receiveMessage(ClientIdentity identity,
java.lang.String registrationId,
java.lang.String secretKey,
java.lang.String filter,
OnCompleteListener<MessageResult> completedCallback,
java.lang.Object state)
Helper method to initiate the call that will receive a message.
|
static void |
sendMessage(ClientIdentity identity,
byte[] message,
java.lang.String fromRegistrationId,
java.lang.String recipientIds,
java.lang.String secretKey,
OnCompleteListener<MessageResult> completedCallback,
java.lang.Object state)
Helper method to initiate the call that will send a message.
|
public static void createEndPoint(ClientIdentity identity, java.lang.String name, OnCompleteListener<EndpointResult> completedCallback, java.lang.Object state) throws java.lang.Exception
identity - the client identityname - Specifies a name of the endpointcompletedCallback - completion callbackstate - user defined state objectjava.lang.Exceptionpublic static void createGroup(ClientIdentity identity, int timeoutInSeconds, OnCompleteListener<GroupResult> completedCallback, java.lang.Object state) throws java.lang.Exception
identity - client identitytimeoutInSeconds - Specifies the time to live in the servicecompletedCallback - completion callbackstate - user defined state objectjava.lang.Exceptionpublic static void deleteEndPoint(ClientIdentity identity, java.lang.String registrationId, java.lang.String secretKey, OnCompleteListener<EndpointResult> completedCallback, java.lang.Object state) throws java.lang.Exception
identity - client identityregistrationId - the endpoint registrationIdsecretKey - the endpoint secretKeycompletedCallback - completion callbackstate - user defined state objectjava.lang.Exceptionpublic static void deleteGroup(ClientIdentity identity, java.lang.String registrationId, java.lang.String secretKey, OnCompleteListener<GroupResult> completedCallback, java.lang.Object state) throws java.lang.Exception
identity - client identityregistrationId - the group registrationIdsecretKey - the group secretKeycompletedCallback - completion callbackstate - user defined state objectjava.lang.Exceptionpublic static void joinGroup(ClientIdentity identity, java.lang.String groupRegistrationId, java.lang.String endpointRegistrationId, java.lang.String secretKey, OnCompleteListener<GroupResult> completedCallback, java.lang.Object state) throws java.lang.Exception
identity - the client identitygroupRegistrationId - the group registrationIdendpointRegistrationId - the endpoint registrationIdsecretKey - the endpoint secretKeycompletedCallback - completion callbackstate - user defined state objectjava.lang.Exceptionpublic static void leaveGroup(ClientIdentity identity, java.lang.String groupRegistrationId, java.lang.String endpointRegistrationId, java.lang.String secretKey, OnCompleteListener<GroupResult> completedCallback, java.lang.Object state) throws java.lang.Exception
identity - the client identitygroupRegistrationId - the group registrationIdendpointRegistrationId - the endpoint registrationIdsecretKey - the endpoint secretKeycompletedCallback - completion callbackstate - user defined state objectjava.lang.Exceptionpublic static void receiveMessage(ClientIdentity identity, java.lang.String registrationId, java.lang.String secretKey, java.lang.String filter, OnCompleteListener<MessageResult> completedCallback, java.lang.Object state) throws java.lang.Exception
identity - client identityregistrationId - the endpoint registrationIdsecretKey - the endpoint secretKeyfilter - Specifies a list of registration ids for Endpoints and/or
Groups that identify senders and/or group recipients of
desired messages.completedCallback - completion callbackstate - user defined state objectjava.lang.Exceptionpublic static void sendMessage(ClientIdentity identity, byte[] message, java.lang.String fromRegistrationId, java.lang.String recipientIds, java.lang.String secretKey, OnCompleteListener<MessageResult> completedCallback, java.lang.Object state) throws java.lang.Exception
identity - client identitymessage - the message contentfromRegistrationId - the endpoint registrationIdrecipientIds - the recipients idssecretKey - the endpoint secretKeycompletedCallback - completion callbackstate - user defined state objectjava.lang.Exception