aboutsummaryrefslogtreecommitdiff
path: root/juick-server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-06-29 14:03:04 +0300
committerGravatar Vitaly Takmazov2017-06-29 14:03:04 +0300
commit02723131139806c761539a42a5fa80b68ecadee8 (patch)
treeca66f22993908758385f708eb2da4e4aeb20510a /juick-server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java
parent4cc4b08f4377b7db697abdb533c625da608eb3d3 (diff)
project structure: split server into jdbc + web
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;
+}