All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.activemq.artemis.shaded.org.jgroups.blocks.cs.ReceiverAdapter Maven / Gradle / Ivy

There is a newer version: 2.33.0
Show newest version
package org.apache.activemq.artemis.shaded.org.jgroups.blocks.cs;

import org.apache.activemq.artemis.shaded.org.jgroups.Address;
import org.apache.activemq.artemis.shaded.org.jgroups.util.Util;

import java.nio.ByteBuffer;

/**
 * An impl of {@link Receiver}. Will get removed with the switch to Java 8; instead we'll use a default impl in Receiver
 * @author Bela Ban
 * @since  3.6.5
 */
public class ReceiverAdapter implements Receiver {
    public void receive(Address sender, byte[] buf, int offset, int length) {

    }

    /**
     * The default implementation assumes that {@link ByteBuffer#flip()}  or {@link ByteBuffer#rewind()} was called on
     * buf before invoking this callback
     * @param sender
     * @param buf
     */
    public void receive(Address sender, ByteBuffer buf) {
        Util.bufferToArray(sender, buf, this);
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy