This commit is contained in:
wentch
2015-12-16 17:21:22 +08:00
parent 322a102229
commit 8b0de511d6
2 changed files with 47 additions and 0 deletions

View File

@@ -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();
}

View File

@@ -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;
}