Search in sources :

Example 1 with NCPublisher

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();
    }
}
Also used : ComponentClient(alma.acs.component.client.ComponentClient) AcsJException(alma.acs.exceptions.AcsJException) NCPublisher(alma.acs.nc.NCPublisher) IDLEntity(org.omg.CORBA.portable.IDLEntity) AcsJContainerServicesEx(alma.JavaContainerError.wrappers.AcsJContainerServicesEx) AcsJException(alma.acs.exceptions.AcsJException)

Aggregations

AcsJContainerServicesEx (alma.JavaContainerError.wrappers.AcsJContainerServicesEx)1 ComponentClient (alma.acs.component.client.ComponentClient)1 AcsJException (alma.acs.exceptions.AcsJException)1 NCPublisher (alma.acs.nc.NCPublisher)1 IDLEntity (org.omg.CORBA.portable.IDLEntity)1