Debian Codegraph @

src/tools/org/h2/dev/ftp/server/FtpEvent.java

raw
1 /*
2 * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0,
3 * and the EPL 1.0 (https://h2database.com/html/license.html).
4 * Initial Developer: H2 Group
5 */
6 package org.h2.dev.ftp.server;
7
8 /**
9 * Describes an FTP event. This class is used by the FtpEventListener.
10 */
11 public class FtpEvent {
12 private final FtpControl control;
13 private final String command;
14 private final String param;
15
16 FtpEvent(FtpControl control, String command, String param) {
17 this.control = control;
18 this.command = command;
19 this.param = param;
20 }
21
22 /**
23 * Get the FTP command. Example: RETR
24 *
25 * @return the command
26 */
27 public String getCommand() {
28 return command;
29 }
30
31 /**
32 * Get the FTP control object.
33 *
34 * @return the control object
35 */
36 public FtpControl getControl() {
37 return control;
38 }
39
40 /**
41 * Get the parameter of the FTP command (if any).
42 *
43 * @return the parameter
44 */
45 public String getParam() {
46 return param;
47 }
48 }