username,
password,
username);
final KnapperClientCore clientCore = KnapperClientCore.getDefault();
IClientSession client = clientCore.getClientSession();
if (listener == null) {
listener = new IEventListener() {
public void handleEvent(IEvent event) {
if (event instanceof ClientChangeEvent) {
ClientChangeEvent cce = (ClientChangeEvent) event;
if (cce.getChange() == ClientChangeEvent.AUTHENTICATED) {
clientCore.getEventService().removeEventListener(listener);
fAuthenticated = true;
}
}
}
};
clientCore.getEventService().addEventListener(listener);
}
client.startClient(cld);
} else {
MessageDialog.openError(
getSplash(),
"Authentication Failed", //NON-NLS-1