bt.torrent.messaging.MessageConsumer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bt-core Show documentation
Show all versions of bt-core Show documentation
BitTorrent Client Library (Core)
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);
}