registerApplication

Creates the registration for this application and starts the connection. This method is equivalent to calling registerApplication:0.

If an application identifier has not already been set, a SUPPersistanceException is thrown. If connection properties are not available, a SUPConnectionPropertyException is thrown. If you use this method, do not call startConnection.

Syntax

- (void)registerApplication;

Parameters

None.

Examples

Usage

You must set up the ConnectionProperties and ApplicationIdentifier before you can invoke registerApplication.

SUPApplication* app = [SUPApplication getInstance];
[app setApplicationIdentifier:@"SUP101"];

MyApplicationCallbackHandler *ch = [MyApplicationCallbackHandler getInstance]; 
[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;
[app registerApplication:120]; // 120 second timeout for registration