Search in sources :

Example 1 with ReceiverAdapter

use of org.jgroups.ReceiverAdapter in project camel by apache.

the class JGroupsProducerTest method doPreSetup.

// Fixture setup
@Override
protected void doPreSetup() throws Exception {
    super.doPreSetup();
    channel = new JChannel();
    channel.setReceiver(new ReceiverAdapter() {

        @Override
        public void receive(Message msg) {
            messageReceived = msg.getObject();
        }
    });
    channel.connect(CLUSTER_NAME);
}
Also used : JChannel(org.jgroups.JChannel) Message(org.jgroups.Message) ReceiverAdapter(org.jgroups.ReceiverAdapter)

Aggregations

JChannel (org.jgroups.JChannel)1 Message (org.jgroups.Message)1 ReceiverAdapter (org.jgroups.ReceiverAdapter)1