aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/processing/response/AbstractData.java
blob: 974345628c9142cbc874c6ae5392a1cea15999fd (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
28
29
30
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.processing.response;

import com.yahoo.component.provider.ListenableFreezableClass;
import com.yahoo.processing.Request;

/**
 * Convenience superclass for implementations of data. This contains no payload.
 *
 * @author bratseth
 */
public abstract class AbstractData extends ListenableFreezableClass implements Data {

    private Request request;

    /**
     * Creates some data marked with the request that created it
     */
    public AbstractData(Request request) {
        this.request = request;
    }

    /**
     * Returns the request that created this data
     */
    public Request request() {
        return request;
    }

}