aboutsummaryrefslogtreecommitdiffstats
path: root/messagebus/src/main/java/com/yahoo/messagebus/ConfigHandler.java
blob: 5081a6bb61e6883541d5dcd2fadd622b90b44be4 (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.messagebus;

import com.yahoo.messagebus.routing.RoutingSpec;

/**
 * This class declares those methods required to be a handler for an instance of the {@link ConfigAgent} class.
 * Instead of declaring separate subscribers and handlers for all types of configurations, this pair is intended to hold
 * everything. Extend this handler whenever new configs are added to {@link ConfigAgent}.
 *
 * @author Simon Thoresen Hult
 */
public interface ConfigHandler {

    /**
     * Sets the routing specification for this client. This will be done synchronously during initialization, and then
     * subsequently whenever an updated configuration is available.
     *
     * @param spec The routing specification.
     */
    public void setupRouting(RoutingSpec spec);
}