bt.torrent.compiler.CompilerVisitor 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.compiler;
import bt.protocol.Message;
import java.lang.invoke.MethodHandle;
/**
* Instances of this class provide callbacks for the {@link MessagingAgentCompiler}.
*
* @since 1.0
*/
public interface CompilerVisitor {
/**
* Visit a message consumer method.
*
* @param consumedType Class, representing a message type,
* that this consumer is interested in
* @param handle Method handle. Method arity is 1 or 2.
* @see bt.torrent.annotation.Consumes
* @param (A subtype of) Message type
* @since 1.0
*/
void visitConsumer(Class consumedType, MethodHandle handle);
/**
* Visit a message producer method.
*
* @param handle Method handle. Method arity is 1 or 2.
* @see bt.torrent.annotation.Consumes
* @since 1.0
*/
void visitProducer(MethodHandle handle);
}