aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient-core/src/main/java/com/yahoo/feedapi/SessionFactory.java
blob: c8b855a6c6131ed4aa413b1594a85298f7351f58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright Yahoo. 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);
}