From 8b0de511d625706b41cffc679ca63c0af69a939d Mon Sep 17 00:00:00 2001 From: wentch <22250530@qq.com> Date: Wed, 16 Dec 2015 17:21:22 +0800 Subject: [PATCH] --- src/org/redkale/net/sncp/SncpParam.java | 26 +++++++++++++++++++++ src/org/redkale/net/sncp/SncpParamType.java | 21 +++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/org/redkale/net/sncp/SncpParam.java create mode 100644 src/org/redkale/net/sncp/SncpParamType.java 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; +}