aboutsummaryrefslogtreecommitdiffstats
path: root/messagebus/src/main/java/com/yahoo/messagebus/routing/HopDirective.java
blob: 4b1ab4cf98a87388c3dadc84a34b7c6c7743bfa8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.messagebus.routing;

/**
 * This class is the base class for the primitives that make up a {@link Hop}'s selector.
 *
 * @author Simon Thoresen Hult
 */
public interface HopDirective {

    /**
     * Returns true if this directive matches another.
     *
     * @param dir The directive to compare this to.
     * @return True if this matches the argument.
     */
    boolean matches(HopDirective dir);

    /**
     * Returns a string representation of this that can be debugged but not parsed.
     *
     * @return The debug string.
     */
    String toDebugString();

}