1 |
26600
|
sandro.lab
|
package eu.dnetlib.msro;
|
2 |
|
|
|
3 |
|
|
import javax.jws.WebService;
|
4 |
|
|
|
5 |
|
|
import org.apache.commons.logging.Log;
|
6 |
|
|
import org.apache.commons.logging.LogFactory;
|
7 |
|
|
import org.springframework.beans.factory.annotation.Required;
|
8 |
|
|
|
9 |
|
|
import eu.dnetlib.enabling.tools.AbstractBaseService;
|
10 |
|
|
import eu.dnetlib.enabling.tools.blackboard.NotificationHandler;
|
11 |
|
|
import eu.dnetlib.msro.rmi.MSROService;
|
12 |
|
|
import eu.dnetlib.msro.workflows.sarasvati.registry.GraphProcessRegistry;
|
13 |
|
|
|
14 |
|
|
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
15 |
|
|
public class MSROServiceImpl extends AbstractBaseService implements MSROService {
|
16 |
|
|
|
17 |
|
|
/**
|
18 |
|
|
* logger.
|
19 |
|
|
*/
|
20 |
|
|
private static final Log log = LogFactory.getLog(MSROServiceImpl.class); // NOPMD by marko on 11/24/08 5:02 PM
|
21 |
|
|
|
22 |
|
|
/**
|
23 |
|
|
* notification handler.
|
24 |
|
|
*/
|
25 |
|
|
private NotificationHandler notificationHandler;
|
26 |
|
|
|
27 |
|
|
/**
|
28 |
|
|
* graph process registry.
|
29 |
|
|
*/
|
30 |
|
|
private GraphProcessRegistry processRegistry;
|
31 |
|
|
|
32 |
|
|
@Override
|
33 |
|
|
public void notify(final String subscriptionId, final String topic, final String isId, final String message) {
|
34 |
|
|
super.notify(subscriptionId, topic, isId, message);
|
35 |
|
|
|
36 |
|
|
log.debug("got notification: " + topic);
|
37 |
|
|
|
38 |
|
|
getNotificationHandler().notified(subscriptionId, topic, isId, message);
|
39 |
|
|
}
|
40 |
|
|
|
41 |
|
|
@Required
|
42 |
|
|
public void setNotificationHandler(final NotificationHandler notHandler) {
|
43 |
|
|
this.notificationHandler = notHandler;
|
44 |
|
|
}
|
45 |
|
|
|
46 |
|
|
public NotificationHandler getNotificationHandler() {
|
47 |
|
|
return notificationHandler;
|
48 |
|
|
}
|
49 |
|
|
|
50 |
|
|
@Required
|
51 |
|
|
public void setProcessRegistry(final GraphProcessRegistry processRegistry) {
|
52 |
|
|
this.processRegistry = processRegistry;
|
53 |
|
|
}
|
54 |
|
|
|
55 |
|
|
public GraphProcessRegistry getProcessRegistry() {
|
56 |
|
|
return processRegistry;
|
57 |
|
|
}
|
58 |
|
|
|
59 |
|
|
}
|