use of alma.acs.nc.NCPublisher in project ACS by ACS-Community.
the class SimpleSupplierReconnClient method createPublisherAndSubscriber.
public void createPublisherAndSubscriber() {
try {
m_client = new ComponentClient(m_logger, System.getProperty("ACS.manager"), "SimpleSupplierReconnClient");
m_publisher = m_client.getContainerServices().createNotificationChannelPublisher(CHANNEL_NAME, IDLEntity.class);
((NCPublisher) m_publisher).setAutoreconnect(m_autoreconnect);
m_publisher.enableEventQueue(100, m_cbObj);
//m_publisher.setAutoreconnect(m_autoreconnect);
} catch (AcsJContainerServicesEx e) {
// Silently ignore the errors
} catch (AcsJException e) {
// Shouldn't happen
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations