public final class WebPubSubServiceClient extends Object
Modifier and Type | Method and Description |
---|---|
com.azure.core.http.rest.Response<Void> |
addConnectionToGroupWithResponse(String group,
String connectionId,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Add a connection to the target group.
|
com.azure.core.http.rest.Response<Void> |
addUserToGroupWithResponse(String group,
String userId,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Add a user to the target group.
|
com.azure.core.http.rest.Response<Boolean> |
checkPermissionWithResponse(String permission,
String connectionId,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Check if a connection has permission to the specified action.
|
com.azure.core.http.rest.Response<Void> |
closeConnectionWithResponse(String connectionId,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Close the client connection.
|
com.azure.core.http.rest.Response<Boolean> |
connectionExistsWithResponse(String connectionId,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Check if the connection with the given connectionId exists.
|
WebPubSubAuthenticationToken |
getAuthenticationToken(GetAuthenticationTokenOptions options)
Creates an authentication token.
|
com.azure.core.http.rest.Response<Void> |
grantPermissionWithResponse(String permission,
String connectionId,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Grant permission to the connection.
|
com.azure.core.http.rest.Response<Boolean> |
groupExistsWithResponse(String group,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Check if there are any client connections inside the given group.
|
com.azure.core.http.rest.Response<Void> |
removeConnectionFromGroupWithResponse(String group,
String connectionId,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Remove a connection from the target group.
|
com.azure.core.http.rest.Response<Void> |
removeUserFromAllGroupsWithResponse(String userId,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Remove a user from all groups.
|
com.azure.core.http.rest.Response<Void> |
removeUserFromGroupWithResponse(String group,
String userId,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Remove a user from the target group.
|
com.azure.core.http.rest.Response<Void> |
revokePermissionWithResponse(String permission,
String connectionId,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Revoke permission for the connection.
|
void |
sendToAll(String message,
WebPubSubContentType contentType)
Broadcast content inside request body to all the connected client connections.
|
com.azure.core.http.rest.Response<Void> |
sendToAllWithResponse(com.azure.core.util.BinaryData message,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Broadcast content inside request body to all the connected client connections.
|
com.azure.core.http.rest.Response<Void> |
sendToAllWithResponse(com.azure.core.util.BinaryData message,
WebPubSubContentType contentType,
long contentLength,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Broadcast content inside request body to all the connected client connections.
|
void |
sendToConnection(String connectionId,
String message,
WebPubSubContentType contentType)
Send content inside request body to the specific connection.
|
com.azure.core.http.rest.Response<Void> |
sendToConnectionWithResponse(String connectionId,
com.azure.core.util.BinaryData message,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Send content inside request body to the specific connection.
|
com.azure.core.http.rest.Response<Void> |
sendToConnectionWithResponse(String connectionId,
com.azure.core.util.BinaryData message,
WebPubSubContentType contentType,
long contentLength,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Send content inside request body to the specific connection.
|
void |
sendToGroup(String group,
String message,
WebPubSubContentType contentType)
Send content inside request body to a group of connections.
|
com.azure.core.http.rest.Response<Void> |
sendToGroupWithResponse(String group,
com.azure.core.util.BinaryData message,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Send content inside request body to a group of connections.
|
com.azure.core.http.rest.Response<Void> |
sendToGroupWithResponse(String group,
com.azure.core.util.BinaryData message,
WebPubSubContentType contentType,
long contentLength,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Send content inside request body to a group of connections.
|
void |
sendToUser(String userId,
String message,
WebPubSubContentType contentType)
Send content inside request body to the specific user.
|
com.azure.core.http.rest.Response<Void> |
sendToUserWithResponse(String userId,
com.azure.core.util.BinaryData message,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Send content inside request body to the specific user.
|
com.azure.core.http.rest.Response<Void> |
sendToUserWithResponse(String userId,
com.azure.core.util.BinaryData message,
WebPubSubContentType contentType,
long contentLength,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Send content inside request body to the specific user.
|
com.azure.core.http.rest.Response<Boolean> |
userExistsWithResponse(String userId,
com.azure.core.http.rest.RequestOptions requestOptions,
com.azure.core.util.Context context)
Check if there are any client connections connected for the given user.
|
public WebPubSubAuthenticationToken getAuthenticationToken(GetAuthenticationTokenOptions options)
options
- Options to apply when creating the authentication token.public com.azure.core.http.rest.Response<Void> sendToAllWithResponse(com.azure.core.util.BinaryData message, WebPubSubContentType contentType, long contentLength, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
message
- The payload body.contentType
- Upload file type.contentLength
- The contentLength parameter.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public void sendToAll(String message, WebPubSubContentType contentType)
message
- The payload body.contentType
- Upload file type.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> sendToAllWithResponse(com.azure.core.util.BinaryData message, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
message
- The payload body.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Boolean> connectionExistsWithResponse(String connectionId, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
connectionId
- The connection Id.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> closeConnectionWithResponse(String connectionId, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
connectionId
- Target connection Id.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> sendToConnectionWithResponse(String connectionId, com.azure.core.util.BinaryData message, WebPubSubContentType contentType, long contentLength, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
connectionId
- The connection Id.message
- The payload body.contentType
- Upload file type.contentLength
- The contentLength parameter.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public void sendToConnection(String connectionId, String message, WebPubSubContentType contentType)
connectionId
- The connection Id.message
- The payload body.contentType
- Upload file type.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> sendToConnectionWithResponse(String connectionId, com.azure.core.util.BinaryData message, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
connectionId
- The connection Id.message
- The payload body.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Boolean> groupExistsWithResponse(String group, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
group
- Target group name, which length should be greater than 0 and less than 1025.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> sendToGroupWithResponse(String group, com.azure.core.util.BinaryData message, WebPubSubContentType contentType, long contentLength, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
group
- Target group name, which length should be greater than 0 and less than 1025.message
- The payload body.contentType
- Upload file type.contentLength
- The contentLength parameter.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public void sendToGroup(String group, String message, WebPubSubContentType contentType)
group
- Target group name, which length should be greater than 0 and less than 1025.message
- The payload body.contentType
- Upload file type.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> sendToGroupWithResponse(String group, com.azure.core.util.BinaryData message, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
group
- Target group name, which length should be greater than 0 and less than 1025.message
- The payload body.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> addConnectionToGroupWithResponse(String group, String connectionId, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
group
- Target group name, which length should be greater than 0 and less than 1025.connectionId
- Target connection Id.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> removeConnectionFromGroupWithResponse(String group, String connectionId, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
group
- Target group name, which length should be greater than 0 and less than 1025.connectionId
- Target connection Id.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Boolean> userExistsWithResponse(String userId, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
userId
- Target user Id.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> sendToUserWithResponse(String userId, com.azure.core.util.BinaryData message, WebPubSubContentType contentType, long contentLength, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
userId
- The user Id.message
- The payload body.contentType
- Upload file type.contentLength
- The contentLength parameter.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public void sendToUser(String userId, String message, WebPubSubContentType contentType)
userId
- The user Id.message
- The payload body.contentType
- Upload file type.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> sendToUserWithResponse(String userId, com.azure.core.util.BinaryData message, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
userId
- The user Id.message
- The payload body.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> addUserToGroupWithResponse(String group, String userId, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
group
- Target group name, which length should be greater than 0 and less than 1025.userId
- Target user Id.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> removeUserFromGroupWithResponse(String group, String userId, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
group
- Target group name, which length should be greater than 0 and less than 1025.userId
- Target user Id.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> removeUserFromAllGroupsWithResponse(String userId, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
userId
- Target user Id.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> grantPermissionWithResponse(String permission, String connectionId, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
permission
- The permission: current supported actions are joinLeaveGroup and sendToGroup.connectionId
- Target connection Id.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> revokePermissionWithResponse(String permission, String connectionId, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
permission
- The permission: current supported actions are joinLeaveGroup and sendToGroup.connectionId
- Target connection Id.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Boolean> checkPermissionWithResponse(String permission, String connectionId, com.azure.core.http.rest.RequestOptions requestOptions, com.azure.core.util.Context context)
permission
- The permission: current supported actions are joinLeaveGroup and sendToGroup.connectionId
- Target connection Id.requestOptions
- The options to configure the HTTP request before HTTP client sends it.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.Copyright © 2021 Microsoft Corporation. All rights reserved.