Search in sources :

Example 1 with AiravataClientConnectException

use of org.apache.airavata.model.error.AiravataClientConnectException in project airavata by apache.

the class XBayaConfiguration method servicesChanged.

public void servicesChanged(ThriftServiceType type) {
    if (type == ThriftServiceType.API_SERVICE) {
        try {
            Client airavataClient = XBayaUtil.getAiravataClient(getThriftClientData(ThriftServiceType.API_SERVICE));
            if (getJcrComponentRegistry() == null) {
                setJcrComponentRegistry(new JCRComponentRegistry(getThriftClientData(ThriftServiceType.API_SERVICE).getGatewayId(), airavataClient));
            } else {
                getJcrComponentRegistry().setClient(airavataClient);
            }
            triggerObservers(getJcrComponentRegistry());
        } catch (AiravataClientConnectException e) {
            logger.error(e.getMessage(), e);
        }
    }
}
Also used : JCRComponentRegistry(org.apache.airavata.workflow.model.component.registry.JCRComponentRegistry) AiravataClientConnectException(org.apache.airavata.model.error.AiravataClientConnectException) Client(org.apache.airavata.api.Airavata.Client)

Example 2 with AiravataClientConnectException

use of org.apache.airavata.model.error.AiravataClientConnectException in project airavata by apache.

the class WorkflowInterpreterLaunchWindow method initGUI.

private void initGUI() {
    this.parameterPanel = new GridPanel(true);
    GridPanel infoPanel = new GridPanel();
    this.instanceNameTextField = new XBayaTextField();
    XBayaLabel instanceNameLabel = new XBayaLabel("Experiment name", this.instanceNameTextField);
    infoPanel.add(instanceNameLabel);
    infoPanel.add(this.instanceNameTextField);
    token = new XBayaTextField("");
    JLabel tokenLabel = new JLabel("Token Id: ");
    infoPanel.add(tokenLabel);
    infoPanel.add(token);
    infoPanel.layout(2, 2, GridPanel.WEIGHT_NONE, 1);
    GridPanel mainPanel = new GridPanel();
    mainPanel.getContentPanel().setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
    mainPanel.add(infoPanel);
    mainPanel.add(this.parameterPanel);
    mainPanel.layout(2, 1, 0, 0);
    JButton okButton = new JButton("Run");
    okButton.addActionListener(new AbstractAction() {

        public void actionPerformed(ActionEvent e) {
            try {
                execute();
            } catch (AiravataClientConnectException e1) {
                e1.printStackTrace();
            } catch (InvalidRequestException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            } catch (AiravataClientException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            } catch (AiravataSystemException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            } catch (TException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            }
        }
    });
    JButton cancelButton = new JButton("Cancel");
    cancelButton.addActionListener(new AbstractAction() {

        public void actionPerformed(ActionEvent e) {
            hide();
        }
    });
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);
    buttonPanel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
    this.dialog = new XBayaDialog(this.engine.getGUI(), "Launch  workflow", mainPanel, buttonPanel);
    this.dialog.setDefaultButton(okButton);
}
Also used : TException(org.apache.thrift.TException) JPanel(javax.swing.JPanel) XBayaDialog(org.apache.airavata.xbaya.ui.dialogs.XBayaDialog) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) AiravataSystemException(org.apache.airavata.model.error.AiravataSystemException) GridPanel(org.apache.airavata.xbaya.ui.widgets.GridPanel) AiravataClientConnectException(org.apache.airavata.model.error.AiravataClientConnectException) InvalidRequestException(org.apache.airavata.model.error.InvalidRequestException) XBayaTextField(org.apache.airavata.xbaya.ui.widgets.XBayaTextField) AiravataClientException(org.apache.airavata.model.error.AiravataClientException) AbstractAction(javax.swing.AbstractAction) XBayaLabel(org.apache.airavata.xbaya.ui.widgets.XBayaLabel)

Example 3 with AiravataClientConnectException

use of org.apache.airavata.model.error.AiravataClientConnectException in project airavata by apache.

the class LaunchApplicationWindow method initGUI.

private void initGUI() {
    this.parameterPanel = new GridPanel(true);
    this.instanceNameTextField = new XBayaTextField();
    XBayaLabel instanceNameLabel = new XBayaLabel("Experiment name", this.instanceNameTextField);
    GridPanel infoPanel = new GridPanel();
    infoPanel.add(instanceNameLabel);
    infoPanel.add(this.instanceNameTextField);
    infoPanel.layout(1, 2, GridPanel.WEIGHT_NONE, 1);
    GridPanel mainPanel = new GridPanel();
    mainPanel.getContentPanel().setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
    mainPanel.add(infoPanel);
    mainPanel.add(this.parameterPanel);
    mainPanel.layout(2, 1, 0, 0);
    JButton okButton = new JButton("Run");
    okButton.addActionListener(new AbstractAction() {

        public void actionPerformed(ActionEvent event) {
            try {
                execute();
            } catch (AiravataClientConnectException e) {
                logger.error(e.getMessage(), e);
            } catch (InvalidRequestException e) {
                logger.error(e.getMessage(), e);
            } catch (AiravataClientException e) {
                logger.error(e.getMessage(), e);
            } catch (AiravataSystemException e) {
                logger.error(e.getMessage(), e);
            } catch (TException e) {
                logger.error(e.getMessage(), e);
            }
        }
    });
    JButton cancelButton = new JButton("Cancel");
    cancelButton.addActionListener(new AbstractAction() {

        public void actionPerformed(ActionEvent e) {
            hide();
        }
    });
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);
    buttonPanel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
    this.dialog = new XBayaDialog(this.engine.getGUI(), "Launch  workflow", mainPanel, buttonPanel);
    this.dialog.setDefaultButton(okButton);
}
Also used : TException(org.apache.thrift.TException) JPanel(javax.swing.JPanel) XBayaDialog(org.apache.airavata.xbaya.ui.dialogs.XBayaDialog) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) AiravataSystemException(org.apache.airavata.model.error.AiravataSystemException) GridPanel(org.apache.airavata.xbaya.ui.widgets.GridPanel) AiravataClientConnectException(org.apache.airavata.model.error.AiravataClientConnectException) InvalidRequestException(org.apache.airavata.model.error.InvalidRequestException) XBayaTextField(org.apache.airavata.xbaya.ui.widgets.XBayaTextField) AiravataClientException(org.apache.airavata.model.error.AiravataClientException) AbstractAction(javax.swing.AbstractAction) XBayaLabel(org.apache.airavata.xbaya.ui.widgets.XBayaLabel)

Aggregations

AiravataClientConnectException (org.apache.airavata.model.error.AiravataClientConnectException)3 ActionEvent (java.awt.event.ActionEvent)2 AbstractAction (javax.swing.AbstractAction)2 JButton (javax.swing.JButton)2 JPanel (javax.swing.JPanel)2 AiravataClientException (org.apache.airavata.model.error.AiravataClientException)2 AiravataSystemException (org.apache.airavata.model.error.AiravataSystemException)2 InvalidRequestException (org.apache.airavata.model.error.InvalidRequestException)2 XBayaDialog (org.apache.airavata.xbaya.ui.dialogs.XBayaDialog)2 GridPanel (org.apache.airavata.xbaya.ui.widgets.GridPanel)2 XBayaLabel (org.apache.airavata.xbaya.ui.widgets.XBayaLabel)2 XBayaTextField (org.apache.airavata.xbaya.ui.widgets.XBayaTextField)2 TException (org.apache.thrift.TException)2 JLabel (javax.swing.JLabel)1 Client (org.apache.airavata.api.Airavata.Client)1 JCRComponentRegistry (org.apache.airavata.workflow.model.component.registry.JCRComponentRegistry)1