Search in sources :

Example 11 with IEventService

use of org.eclipse.scanning.api.event.IEventService in project gda-core by openGDA.

the class SubmitScanToScriptSection method initialize.

@Override
public void initialize(MappingExperimentView mappingView) {
    super.initialize(mappingView);
    final IEventService eventService = getService(IEventService.class);
    try {
        final URI activeMQUri = new URI(LocalProperties.getActiveMQBrokerURI());
        jobQueueProxy = eventService.createJobQueueProxy(activeMQUri, EventConstants.SUBMISSION_QUEUE, EventConstants.CMD_TOPIC, EventConstants.ACK_TOPIC);
    } catch (Exception e) {
        logger.error("Error creating consumer proxy", e);
    }
}
Also used : IEventService(org.eclipse.scanning.api.event.IEventService) URI(java.net.URI) EventException(org.eclipse.scanning.api.event.EventException)

Example 12 with IEventService

use of org.eclipse.scanning.api.event.IEventService in project gda-core by openGDA.

the class TimeSeriesScanView method getRunnableDeviceService.

private IRunnableDeviceService getRunnableDeviceService() throws ScanningException {
    if (runnableDeviceService == null) {
        try {
            final IEventService eventService = eclipseContext.get(IEventService.class);
            final URI jmsURI = new URI(LocalProperties.getActiveMQBrokerURI());
            return eventService.createRemoteService(jmsURI, IRunnableDeviceService.class);
        } catch (EventException | URISyntaxException e) {
            throw new ScanningException(e);
        }
    }
    return runnableDeviceService;
}
Also used : EventException(org.eclipse.scanning.api.event.EventException) ScanningException(org.eclipse.scanning.api.scan.ScanningException) IEventService(org.eclipse.scanning.api.event.IEventService) URISyntaxException(java.net.URISyntaxException) URI(java.net.URI)

Aggregations

IEventService (org.eclipse.scanning.api.event.IEventService)12 URI (java.net.URI)8 EventException (org.eclipse.scanning.api.event.EventException)7 URISyntaxException (java.net.URISyntaxException)5 IRunnableDeviceService (org.eclipse.scanning.api.device.IRunnableDeviceService)2 ServiceHolder (gda.data.ServiceHolder)1 JythonServer (gda.jython.JythonServer)1 ArrayList (java.util.ArrayList)1 PostConstruct (javax.annotation.PostConstruct)1 NexusFileFactoryHDF5 (org.eclipse.dawnsci.hdf5.nexus.NexusFileFactoryHDF5)1 MarshallerService (org.eclipse.dawnsci.json.MarshallerService)1 DefaultNexusBuilderFactory (org.eclipse.dawnsci.nexus.builder.impl.DefaultNexusBuilderFactory)1 INexusDeviceService (org.eclipse.dawnsci.nexus.device.INexusDeviceService)1 NexusDeviceService (org.eclipse.dawnsci.nexus.device.impl.NexusDeviceService)1 NexusScanFileServiceImpl (org.eclipse.dawnsci.nexus.scan.impl.NexusScanFileServiceImpl)1 IBeanListener (org.eclipse.scanning.api.event.bean.IBeanListener)1 QueueCommandBean (org.eclipse.scanning.api.event.queue.QueueCommandBean)1 ScanBean (org.eclipse.scanning.api.event.scan.ScanBean)1 IMalcolmDevice (org.eclipse.scanning.api.malcolm.IMalcolmDevice)1 IPointGeneratorService (org.eclipse.scanning.api.points.IPointGeneratorService)1