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

bt.torrent.messaging.MessageConsumer Maven / Gradle / Ivy

There is a newer version: 1.10
Show newest version
package bt.torrent.messaging;

import bt.protocol.Message;

/**
 * Message agent, that is interested in receiving messages of type T
 *
 * @see bt.torrent.annotation.Consumes
 * @param  Message type
 * @since 1.0
 */
public interface MessageConsumer {

    /**
     * @return Message type, that this consumer is interested in
     * @since 1.0
     */
    Class getConsumedType();

    /**
     * @since 1.0
     */
    void consume(T message, MessageContext context);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy