Search in sources :

Example 1 with ArchiveConsumer

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);
}
Also used : ArchiveConsumer(alma.acs.nc.ArchiveConsumer) NamingContext(org.omg.CosNaming.NamingContext)

Example 2 with ArchiveConsumer

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);
        }
    }
}
Also used : ArchiveConsumer(alma.acs.nc.ArchiveConsumer) AcsJException(alma.acs.exceptions.AcsJException)

Aggregations

ArchiveConsumer (alma.acs.nc.ArchiveConsumer)2 AcsJException (alma.acs.exceptions.AcsJException)1 NamingContext (org.omg.CosNaming.NamingContext)1