aboutsummaryrefslogtreecommitdiff
path: root/juick-server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java')
-rw-r--r--juick-server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/juick-server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java b/juick-server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java
new file mode 100644
index 00000000..42a9bb59
--- /dev/null
+++ b/juick-server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java
@@ -0,0 +1,33 @@
+package com.juick.server.protocol.annotation;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Created by oxpa on 22.03.16.
+ */
+@Target({ElementType.TYPE, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface UserCommand {
+ /**
+ *
+ * @return a command pattern
+ */
+ String pattern() default StringUtils.EMPTY;
+
+ /**
+ *
+ * @return pattern flags
+ */
+ int patternFlags() default 0;
+
+ /**
+ *
+ * @return a string used in HELP command output. Basically, only 1 string
+ */
+ String help() default StringUtils.EMPTY;
+}