diff --git a/src/org/redkale/net/sncp/SncpParam.java b/src/org/redkale/net/sncp/SncpParam.java new file mode 100644 index 000000000..4d29ee123 --- /dev/null +++ b/src/org/redkale/net/sncp/SncpParam.java @@ -0,0 +1,26 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.redkale.net.sncp; + +import java.lang.annotation.*; +import static java.lang.annotation.ElementType.PARAMETER; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * SNCP协议中Service方法的参数标记。 只有Service的方法为远程模式或@MultiRun时该注解才有效。 + * + * + * @see http://www.redkale.org + * @author zhangjx + */ +@Inherited +@Documented +@Target({PARAMETER}) +@Retention(RUNTIME) +public @interface SncpParam { + + SncpParamType value(); +} diff --git a/src/org/redkale/net/sncp/SncpParamType.java b/src/org/redkale/net/sncp/SncpParamType.java new file mode 100644 index 000000000..19800b5b5 --- /dev/null +++ b/src/org/redkale/net/sncp/SncpParamType.java @@ -0,0 +1,21 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.redkale.net.sncp; + +/** + * + * @author zhangjx + */ +public enum SncpParamType { + /** + * SNCP协议中标记为来源地址参数, 该注解只能标记在类型为SocketAddress或InetSocketAddress的参数上。 + */ + SourceAddress, + /** + * SNCP协议中标记为目标地址参数, 该注解只能标记在类型为SocketAddress或InetSocketAddress的参数上。 + */ + TargetAddress; +}