| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.common.mw.protocol; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.lang.annotation.ElementType; | 
|---|
|  |  |  | import java.lang.annotation.Retention; | 
|---|
|  |  |  | import java.lang.annotation.RetentionPolicy; | 
|---|
|  |  |  | import java.lang.annotation.Target; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Target(ElementType.TYPE) | 
|---|
|  |  |  | @Retention(RetentionPolicy.RUNTIME) | 
|---|
|  |  |  | public @interface AnnotationOnLine { | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 所属协议名称 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | String protocolName() default "" ; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 所属协议版本号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | short protocolVersion() default -1 ; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 配置是否启动 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | boolean enable() default true ; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 为优先级(从1开始,最小为1,各协议间优先级相差1),数字越小级别越高。 | 
|---|
|  |  |  | * 若有多个协议,各个协议的上线处理类以优先级进行排序,优先级高的先处理上线数据。 | 
|---|
|  |  |  | * 数值与AnnotationPrefixedDataAvailable的priority相等 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | int priority() default 0 ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|