/* $Id: DomainListener.java 1907 2008-10-18 01:34:33Z rwarren $

   Copyright 2006, Real-Time Innovations.
   All rights reserved.
   No duplications, whole or partial, manual or electronic, may be made
   without express written permission.  Any such copies, or
   revisions thereof, must display this notice unaltered.
   This code contains trade secrets of Real-Time Innovations, Inc.

modification history:
--------------------
01apr08,rbw Created
=========================================================================== */

package com.rti.perftest.ddsimpl;

import com.rti.dds.domain.DomainParticipantAdapter;
import com.rti.dds.publication.DataWriter;
import com.rti.dds.publication.OfferedIncompatibleQosStatus;
import com.rti.dds.subscription.DataReader;
import com.rti.dds.subscription.RequestedIncompatibleQosStatus;
import com.rti.dds.topic.InconsistentTopicStatus;
import com.rti.dds.topic.Topic;


// ===========================================================================

/**
 * Logs callbacks that come to a participant.
 */
/*package*/ final class DomainListener extends DomainParticipantAdapter {
    // --- From DomainParticipantListener: -----------------------------------

    @Override
    public void on_inconsistent_topic(
            Topic topic, InconsistentTopicStatus status) {

        System.out.println(
                "Found inconsistent topic " +
                topic.get_name() +
                " of type " +
                topic.get_type_name());
    }


    @Override
    public void on_offered_incompatible_qos(
            DataWriter writer, OfferedIncompatibleQosStatus status) {

        System.out.println(
                "Found incompatible reader for writer " +
                writer.get_topic().get_name() +
                "  QoS is " +
                status.last_policy_id);
    }


    @Override
    public void on_requested_incompatible_qos(
            DataReader reader, RequestedIncompatibleQosStatus status) {

        System.out.println(
                "Found incompatible writer for reader " +
                reader.get_topicdescription().get_name() +
                "  QoS is " +
                status.last_policy_id);
    }

}

// ===========================================================================
// End of $Id: DomainListener.java 1907 2008-10-18 01:34:33Z rwarren $
