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

import com.yahoo.messagebus.ReplyHandler;

/**
 * Wraps the creation of messagebus source sessions to allow
 * for unit testing of the components without involving messagebus itself.
 */
public interface SessionFactory {

    /**
     * Creates a messagebus session for sending regular messages.
     *
     *
     * @param handler A replyhandler to callback when receiving replies from messagebus
     * @return The session to use for sending messages.
     */
    SendSession createSendSession(ReplyHandler handler);
}