aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com/juick/server/component/SubscribeEvent.java
blob: 2d3ceddbf31bef1c4220a8abf6e8f78fec94e0c7 (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
package com.juick.server.component;

import com.juick.User;
import org.springframework.context.ApplicationEvent;

public class SubscribeEvent extends ApplicationEvent {
    private User user;
    private User toUser;
    /**
     * Create a new ApplicationEvent.
     *
     * @param source the object on which the event initially occurred (never {@code null})
     */
    public SubscribeEvent(Object source, User user, User toUser) {
        super(source);
        this.user = user;
        this.toUser = toUser;
    }

    public User getUser() {
        return user;
    }

    public User getToUser() {
        return toUser;
    }
}