Search in sources :

Example 1 with JCRComponentRegistry

use of org.apache.airavata.workflow.model.component.registry.JCRComponentRegistry 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)

Aggregations

Client (org.apache.airavata.api.Airavata.Client)1 AiravataClientConnectException (org.apache.airavata.model.error.AiravataClientConnectException)1 JCRComponentRegistry (org.apache.airavata.workflow.model.component.registry.JCRComponentRegistry)1