BlackBerry Dynamics diagnostic checks and information. More...
#import <BlackBerryDynamics/GD/GDDiagnostic.h>
This class contains a number of programming interfaces for running checks and retrieving information for diagnostic purposes.
Use the application programming interface (API) of this class if the application encounters an error that might involve the BlackBerry Dynamics infrastructure or configuration in some way. The API includes functions to:
The return values are generally structured text that is intended to be logged by the application and then made available to technical support staff. The structure and content aren't documented.
Public Types | |
typedef void(^ | GDDiagnosticReachabilityResultsBlock) (NSString *results, NSInteger requestID) |
Type for check reachability results callback. More... | |
Instance Methods | |
(NSInteger) | - checkApplicationServerReachability:withPort:useSSL:validateCertificate:withTimeOut:callbackBlock: |
Check that an application server can be reached. More... | |
(NSArray *) | - checkManagementConsoleReachability:callbackBlock: |
Check that the BlackBerry Dynamics management console can be reached. More... | |
Class Methods | |
(GDDiagnostic *) | + sharedInstance |
Get a reference to the BlackBerry Dynamics diagnostic object. More... | |
Protected Types | |
enum | GDDiagnosticReachabilityErrorType { GDDiagnosticNoError =0, GDDiagnosticNoNetwork, GDDiagnosticNetworkChange, GDDiagnosticTimedOut } |
Error codes for reachability checks. More... | |
Properties | |
NSString * | currentSettings |
Current application configuration settings. More... | |
+ (GDDiagnostic *) sharedInstance |
This function returns a reference to the BlackBerry Dynamics diagnostic object, which is a "singleton class".
- (NSInteger) checkApplicationServerReachability: | (NSString *) | host | |
withPort: | (NSInteger) | port | |
useSSL: | (BOOL) | ssl | |
validateCertificate: | (BOOL) | validateCertificate | |
withTimeOut: | (NSTimeInterval) | timeOut | |
callbackBlock: | (GDDiagnosticReachabilityResultsBlock) | block | |
Call this function to check the reachability of an application server by BlackBerry Dynamics communication. The application server endpoint is specified as a host name and port number.
When this function is called, the BlackBerry Dynamics runtime will make a number of attempts to reach the specified server. One or more routes may be used, depending on enterprise configuration. For example, the runtime could attempt to connect through the BlackBerry Dynamics proxy infrastructure via an endpoint behind the enterprise firewall. The results of all attempts are returned in a single text string that can be logged by the application for diagnostic purposes.
This function is asynchronous. Results are returned by invocation of a code block.
Every call to this function is issued a unique request identifier. The identifier is returned synchronously, as the return value of this function, and asynchronously, with the results. The identifier can be used to match results with calls, in the case that the application initiates multiple concurrent reachability checks.
A time out can be specified. If it is, and checking hasn't completed when the time out expires, then the results up to that point are returned.
host | NSString containing the hostname of the server to check. |
port | NSInteger for the port number to check. |
ssl | YES to check reachability using a Secure Socket Layer connection or Transport Layer Security (SSL/TLS).NO to use a plain socket connection without SSL/TLS. |
validateCertificate | If using SSL/TLS:YES to require a valid certificate, and treat an invalid certificate as a connection error.NO to switch off certificate checking.If the ssl parameter is NO , this flag is ignored. |
timeOut | NSTimeInterval representing the time out, in seconds. |
block | GDDiagnosticReachabilityResultsBlock for the results callback. |
NSInteger
value that identifies this call. - (NSArray*) checkManagementConsoleReachability: | (NSTimeInterval) | timeOut | |
callbackBlock: | (GDDiagnosticReachabilityResultsBlock) | block | |
Call this function to check the reachability of the BlackBerry Dynamics management console. The management console is a service within every BlackBerry Dynamics deployment, with which the end user of the application is associated by BlackBerry Dynamics activation processing. The service can run on a single server, or on a cluster of servers operating as a node.
When this function is called, the BlackBerry Dynamics runtime will make a number of attempts to reach each of the servers that provide the management console service. One or more routes may be used for each server, depending on enterprise configuration. For example, the runtime could attempt to connect through the BlackBerry Dynamics proxy infrastructure via an endpoint behind the enterprise firewall. The results of all attempts are returned in a number of text strings, one for each server. The text strings can be logged by the application for diagnostic purposes.
This function is asynchronous. Results are returned by multiple invocations of a code block.
Every call to this function is issued an array of unique request identifiers. The array is returned synchronously, as the return value of this function. Individual values within the array are also returned asynchronously, with each of the results. The identifier can be used to match results with calls, in the case that the application initiates multiple concurrent reachability checks.
A time out can be specified. If it is, and checking hasn't completed when the time out expires, then the results up to that point are returned.
timeOut | NSTimeInterval representing the time out, in seconds. |
block | GDDiagnosticReachabilityResultsBlock for the results callback. |
NSArray
of NSInteger
containing identifier values.
|
readnonatomicassign |
A number of current application configuration settings, which can be logged by the application for diagnostic purposes.