This commit is contained in:
26
src/org/redkale/net/sncp/SncpParam.java
Normal file
26
src/org/redkale/net/sncp/SncpParam.java
Normal 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();
|
||||
}
|
||||
21
src/org/redkale/net/sncp/SncpParamType.java
Normal file
21
src/org/redkale/net/sncp/SncpParamType.java
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user