package com.vci.client.oq; import javax.swing.JPanel; import com.vci.client.common.providers.ServiceProvider; import com.vci.client.oq.ui.QTPanelForLink; import com.vci.client.ui.frame.UIConstructorInterface; import com.vci.corba.common.VCIError; import com.vci.corba.query.ObjectQueryServicePrx; public class QTClientForLink implements UIConstructorInterface{ private static ObjectQueryServicePrx qtService = null; private static QTClientForLink qtClient = null; private static QTClientForLink getInstance(){ if(qtClient == null){ qtClient = new QTClientForLink(); } return qtClient; } @Override public void destory() throws VCIError { // TODO Auto-generated method stub } @Override public void init() throws VCIError { if(qtService != null){ return; } try { qtService = ServiceProvider.getOQService(); } catch (Exception e) { throw new VCIError("", new String[0]); } } @Override public JPanel start() throws VCIError { QTPanelForLink.cleanInstance(); QTPanelForLink qtPanelForLink = QTPanelForLink.getInstance(); return qtPanelForLink; } public static ObjectQueryServicePrx getService() throws VCIError{ if(qtService == null){ try { QTClientForLink.getInstance().init(); } catch (VCIError e) { throw new VCIError("", new String[0]); } } return qtService; } }