final Callback<ResponseBody> callback,
final Object context, boolean isHub) {
// Validate that the format of the subscriberId is valid either as a
// local or hub subscriber.
if (!isValidSubscriberId(subscriberId, isHub)) {
callback.operationFailed(context, new ServiceDownException(new InvalidSubscriberIdException(
"SubscriberId passed is not valid: " + subscriberId.toStringUtf8() + ", isHub: " + isHub)));
return;
}
// Asynchronously close the subscription. On the callback to that
// operation once it completes, post the async unsubscribe request.