Creates the registration for this application and starts the connection. This method is equivalent to calling registerApplication(0), but is a non-blocking call which returns immediately.
- (void)registerApplication;
None.
[app registerApplication];
You must set up the ConnectionProperties and ApplicationIdentifier before you can invoke registerApplication.
SUPApplication* app = [SUPApplication getInstance];
[app setApplicationIdentifier:@"SUP101"];
MyApplicationCallbackHandler *ch = [MyApplicationCallbackHandler getInstance];
[ch retain];
[app setApplicationCallback:ch];
SUPConnectionProperties* props = app.connectionProperties;
[props setServerName:@"supserver.mycompany.com"];
[props setPortNumber:5001];
SUPLoginCredentials* login = [SUPLoginCredentials getInstance];
login.username = @"supAdmin";
login.password = @"supPwd";
props.loginCredentials = login;
if ([app registrationStatus] != SUPRegistrationStatus_REGISTERED &&
[app registrationStatus] != SUPRegistrationStatus_REGISTERING )
{
[app registerApplication:120]; // 120 second timeout for registration
}