]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcExecutionNotifier.java
Compilation error with JDK 1.5
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.activemq / src / main / java / org / argeo / slc / jms / JmsSlcExecutionNotifier.java
1 package org.argeo.slc.jms;
2
3 import java.util.List;
4
5 import javax.jms.Destination;
6
7 import org.argeo.slc.SlcException;
8 import org.argeo.slc.UnsupportedException;
9 import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
10 import org.argeo.slc.process.SlcExecution;
11 import org.argeo.slc.process.SlcExecutionNotifier;
12 import org.argeo.slc.process.SlcExecutionStep;
13 import org.springframework.jms.core.JmsTemplate;
14
15 public class JmsSlcExecutionNotifier implements SlcExecutionNotifier {
16
17 private JmsTemplate jmsTemplate;
18
19 private Destination executionEventDestination;
20 //private Destination updateStatusDestination;
21
22 public void updateStatus(SlcExecution slcExecution, String oldStatus,
23 String newStatus) {
24 SlcExecutionStatusRequest req = new SlcExecutionStatusRequest(
25 slcExecution.getUuid(), newStatus);
26 jmsTemplate.convertAndSend(executionEventDestination, req);
27 }
28
29 public void addSteps(SlcExecution slcExecution,
30 List<SlcExecutionStep> additionalSteps) {
31 throw new UnsupportedException();
32 }
33
34 public void newExecution(SlcExecution slcExecution) {
35 throw new UnsupportedException();
36 }
37
38 public void updateExecution(SlcExecution slcExecution) {
39 throw new UnsupportedException();
40 }
41
42 public void setJmsTemplate(JmsTemplate jmsTemplate) {
43 this.jmsTemplate = jmsTemplate;
44 }
45
46 public void setExecutionEventDestination(Destination executionEventDestination) {
47 this.executionEventDestination = executionEventDestination;
48 }
49
50
51
52 // public void setUpdateStatusDestination(Destination updateStatusDestination) {
53 // this.updateStatusDestination = updateStatusDestination;
54 // }
55
56 }