use of alma.acs.nc.ArchiveConsumer in project ACS by ACS-Community.
the class ArchiveConsumerTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
NamingContext ncRef = NamingContextHelper.narrow(getContainerServices().getAdvancedContainerServices().getORB().resolve_initial_references("NameService"));
m_consumer = new ArchiveConsumer(this, getContainerServices(), ncRef);
}
use of alma.acs.nc.ArchiveConsumer in project ACS by ACS-Community.
the class EventModel method getArchiveConsumer.
/**
* TODO: Call this from mouse menu of Archiving NC instead of in the beginning.
* (It used to be called once a minute from a thread of the event list / archiving list parts.)
*
* Creates on demand an ArchiveConsumer and stores its reference in field {@link #archiveConsumer}.
*/
private synchronized void getArchiveConsumer() {
if (archiveConsumer == null) {
try {
archiveConsumer = new ArchiveConsumer(new ArchiveReceiver(archQueue), cs, nctx);
archiveConsumer.startReceivingEvents();
m_logger.info("Subscribed to monitoring/archiving events.");
} catch (AcsJException ex) {
m_logger.log(Level.WARNING, "Failed to subcribe to monitoring/archiving events.", ex);
}
}
}
Aggregations