package com.vci.client.oq;
|
|
import javax.swing.JPanel;
|
|
import com.vci.client.common.providers.ServiceProvider;
|
import com.vci.client.oq.ui.QTDPanel;
|
import com.vci.client.ui.frame.UIConstructorInterface;
|
import com.vci.corba.common.VCIError;
|
import com.vci.corba.omd.qtm.QTDServicePrx;
|
|
public class QTDClient implements UIConstructorInterface {
|
private static QTDServicePrx qtdService = null;
|
private static QTDClient qtdClient = null;
|
|
private static QTDClient getInstance() {
|
if (qtdClient == null) {
|
qtdClient = new QTDClient();
|
}
|
return qtdClient;
|
}
|
|
@Override
|
public void destory() throws VCIError {
|
// TODO Auto-generated method stub
|
|
}
|
|
@Override
|
public void init() throws VCIError {
|
if (qtdService != null) {
|
return;
|
}
|
try {
|
|
qtdService = ServiceProvider.getOMDService().getQTDService();
|
} catch (Exception e) {
|
throw new VCIError("", new String[0]);
|
}
|
}
|
|
@Override
|
public JPanel start() throws VCIError {
|
QTDPanel.cleanInstance();
|
QTDPanel qtdPanel = QTDPanel.getInstance();
|
return qtdPanel;
|
}
|
|
public static QTDServicePrx getService() throws VCIError {
|
if (qtdService == null) {
|
try {
|
QTDClient.getInstance().init();
|
} catch (VCIError e) {
|
throw new VCIError("", new String[0]);
|
}
|
}
|
return qtdService;
|
}
|
|
}
|