void transport_MessageResponseReceived(BlackberryMessageTransportResponse response) { var notification = response.Message; var singleResultNotification = BlackberryNotification.ForSingleRegistrationId(notification, notification.PushPin); if (response.ResponseCode == BlackberryMessageTransportResponseCode.Accepted || response.ResponseCode == BlackberryMessageTransportResponseCode.OK) { //It worked! Raise success this.Events.RaiseNotificationSent(singleResultNotification); } else if (response.ResponseCode == BlackberryMessageTransportResponseCode.ServiceUnavailable) { this.QueueNotification(singleResultNotification); } else if (response.ResponseCode == BlackberryMessageTransportResponseCode.RimPushIdNotFound) { //Raise failure and device expired this.Events.RaiseDeviceSubscriptionExpired(PlatformType.Blackberry, singleResultNotification.PushPin, singleResultNotification); } else { //Raise failure, for unknown reason this.Events.RaiseNotificationSendFailure(singleResultNotification, new BlackberryMessageTransportException(response.ResponseCode.ToString(), response)); } Interlocked.Decrement(ref waitCounter); }
public BlackberryAuthenticationErrorTransportException(BlackberryMessageTransportResponse response) : base("Authentication Failed", response) { }
public BlackberryMessageTransportException(string message, BlackberryMessageTransportResponse response) : base(message) { this.Response = response; }
public BlackberryServiceUnavailableTransportException(TimeSpan retryAfter, BlackberryMessageTransportResponse response) : base("Service Temporarily Unavailable. Please wait the retryAfter amount and implement an Exponential Backoff", response) { this.RetryAfter = retryAfter; }
public BlackberryBadRequestTransportException(BlackberryMessageTransportResponse response) : base("Bad Request", response) { }