aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com/googlesource/gerrit/plugins/qtcodereview/QtCommandPing.java
blob: 6d9dea0713f00bf36606d1e73135ce37edaafd8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//
// Copyright (C) 2018 The Qt Company
//

package com.googlesource.gerrit.plugins.qtcodereview;

import com.google.gerrit.sshd.SshCommand;
import com.google.gerrit.sshd.CommandMetaData;

@CommandMetaData(name="ping", description="Ping the SSH Command interface")
class QtCommandPing extends SshCommand {
    @Override
    protected void run() {
        stdout.print(String.format("Pong\n  username=%s\n  name=%s\n  email=%s\n",
                                    user.asIdentifiedUser().getUserName(),
                                    user.asIdentifiedUser().getName(),
                                    user.asIdentifiedUser().getNameEmail()));
    }
}