Initiates a login session with the server. A session is established asynchronously with the server as follows:
First, this client attempts to establish a connection with the server. If the client fails to establish a connection, then the client listener's {@link SimpleClientListener#disconnected disconnected} method is invoked with a {@code String} indicating thereason for the failure.
If a connection with the server is successfully established, this client's {@link PasswordAuthentication login credential} is obtained by invoking its {@link SimpleClientListener listener}'s {@link SimpleClientListener#getPasswordAuthentication getPasswordAuthentication} method with a login prompt.
Next, this client sends a login request to the server. If the login request is malformed, the client listener's {@link SimpleClientListener#disconnected disconnected} method is invokedwith a {@code String} indicating the reason for the failure or{@code null} if no reason can be determined.
If the client's login credential (as obtained above) is verified, then the client listener's {@link SimpleClientListener#loggedIn loggedIn} method is invoked. If,however, the login fails due to a login authentication failure or some other failure on the server while processing the login request, the client listener's {@link SimpleClientListener#loginFailed loginFailed} method is invoked with a {@code String} indicating thereason for the failure.
If this client is disconnected for any reason (including login failure), this method may be used again to log in.
The supported connection properties are:
Key | Description of Associated Value |
{@code host} | SGS host address (required) |
{@code port} | SGS port (required) |
@param props the connection properties to use in creating theclient's session
@throws IOException if a synchronous IO error occurs
@throws IllegalStateException if this session is already connectedor connecting
@throws SecurityException if the caller does not have permissionto connect to the remote endpoint