1
|
package eu.dnetlib.enabling.hcm;
|
2
|
|
3
|
import org.apache.commons.logging.Log;
|
4
|
import org.apache.commons.logging.LogFactory;
|
5
|
import org.springframework.beans.factory.annotation.Required;
|
6
|
|
7
|
import eu.dnetlib.enabling.hcm.rmi.HostingContextManagerService;
|
8
|
import eu.dnetlib.enabling.tools.AbstractBaseService;
|
9
|
import eu.dnetlib.enabling.tools.blackboard.NotificationHandler;
|
10
|
|
11
|
/**
|
12
|
* CNR HostingContextManagerService implementation. Will conflict with NKUA! yes this is ok.
|
13
|
*
|
14
|
* @author marko
|
15
|
*
|
16
|
*/
|
17
|
public class HostingContextManagerServiceImpl extends AbstractBaseService implements HostingContextManagerService {
|
18
|
|
19
|
/**
|
20
|
* logger.
|
21
|
*/
|
22
|
private static final Log log = LogFactory.getLog(HostingContextManagerServiceImpl.class); // NOPMD by marko on 11/24/08 5:02 PM
|
23
|
|
24
|
/**
|
25
|
* notification handler.
|
26
|
*/
|
27
|
private NotificationHandler notificationHandler; // NOPMD
|
28
|
|
29
|
@Override
|
30
|
public void notify(String subscrId, String topic, String isId, String message) {
|
31
|
if (log.isDebugEnabled()) {
|
32
|
log.debug("---- service got notification ----");
|
33
|
log.debug("subscrId: " + subscrId);
|
34
|
log.debug("topic " + topic);
|
35
|
log.debug("isId " + isId);
|
36
|
log.debug("msg: " + message);
|
37
|
log.debug("____ now processing the notification ____");
|
38
|
}
|
39
|
getNotificationHandler().notified(subscrId, topic, isId, message);
|
40
|
}
|
41
|
|
42
|
/**
|
43
|
* {@inheritDoc}
|
44
|
*
|
45
|
* @see eu.dnetlib.enabling.tools.AbstractBaseService#start()
|
46
|
*/
|
47
|
@Override
|
48
|
public void start() {
|
49
|
log.info("staring hosting context manager");
|
50
|
}
|
51
|
|
52
|
public NotificationHandler getNotificationHandler() {
|
53
|
return notificationHandler;
|
54
|
}
|
55
|
|
56
|
@Required
|
57
|
public void setNotificationHandler(NotificationHandler notificationHandler) {
|
58
|
this.notificationHandler = notificationHandler;
|
59
|
}
|
60
|
|
61
|
}
|