aboutsummaryrefslogtreecommitdiffstats
path: root/jrt/src/com/yahoo/jrt/MethodHandler.java
blob: 30a2bf04eb7ca848a4d0b47d670379bf16a58f1d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jrt;


/**
 * <p>Interface used to handle the invocation of a method.</p>
 *
 * <p>The {@link Method} class is used to register rpc methods. There
 * are two ways rpc methods can be defined(bound); with this interface
 * or with reflection. This choice is reflected by the two different
 * constructors in the {@link Method} class.</p>
 **/
@FunctionalInterface
public interface MethodHandler {

    /**
     * Method used to dispatch an rpc request.
     *
     * @param req the request
     **/
    public void invoke(Request req);
}