1.interface 定义变量,默认是常量

master
星期八 5 years ago
parent 4f39aabaf6
commit 635ef92e8b
  1. 13
      proxy-protocol/Constants.java
  2. 6
      proxy-protocol/src/main/java/org/fengfei/lanproxy/protocol/Constants.java

@ -1,13 +0,0 @@
package org.fengfei.lanproxy.server;
import io.netty.channel.Channel;
import io.netty.util.AttributeKey;
public interface Constants {
public static final AttributeKey<Channel> NEXT_CHANNEL = AttributeKey.newInstance("nxt_channel");
public static final AttributeKey<String> USER_ID = AttributeKey.newInstance("user_id");
public static final AttributeKey<String> CLIENT_KEY = AttributeKey.newInstance("client_key");
}

@ -5,9 +5,9 @@ import io.netty.util.AttributeKey;
public interface Constants { public interface Constants {
public static final AttributeKey<Channel> NEXT_CHANNEL = AttributeKey.newInstance("nxt_channel"); AttributeKey<Channel> NEXT_CHANNEL = AttributeKey.newInstance("nxt_channel");
public static final AttributeKey<String> USER_ID = AttributeKey.newInstance("user_id"); AttributeKey<String> USER_ID = AttributeKey.newInstance("user_id");
public static final AttributeKey<String> CLIENT_KEY = AttributeKey.newInstance("client_key"); AttributeKey<String> CLIENT_KEY = AttributeKey.newInstance("client_key");
} }

Loading…
Cancel
Save