1 18 19 20 package sync4j.framework.core; 21 22 23 31 public final class AlertCode { 32 public final static int DISPLAY = 100; 33 public final static int TWO_WAY = 200; 34 public final static int SLOW = 201; 35 public final static int ONE_WAY_FROM_CLIENT = 202; 36 public final static int REFRESH_FROM_CLIENT = 203; 37 public final static int ONE_WAY_FROM_SERVER = 204; 38 public final static int REFRESH_FROM_SERVER = 205; 39 public final static int TWO_WAY_BY_SERVER = 206; 40 public final static int ONE_WAY_FROM_CLIENT_BY_SERVER = 207; 41 public final static int REFRESH_FROM_CLIENT_BY_SERVER = 208; 42 public final static int ONE_WAY_FROM_SERVER_BY_SERVER = 209; 43 public final static int REFRESH_FROM_SERVER_BY_SERVER = 210; 44 public final static int RESULT_ALERT = 221; 45 public final static int NEXT_MESSAGE = 222; 46 public final static int NO_END_OF_DATA = 223; 47 48 private AlertCode() {} 49 50 70 static public boolean isInitializationCode(int code) { 71 return ( (code == TWO_WAY ) 72 || (code == SLOW ) 73 || (code == ONE_WAY_FROM_CLIENT ) 74 || (code == REFRESH_FROM_CLIENT ) 75 || (code == ONE_WAY_FROM_SERVER ) 76 || (code == REFRESH_FROM_SERVER ) 77 || (code == TWO_WAY_BY_SERVER ) 78 || (code == ONE_WAY_FROM_CLIENT_BY_SERVER) 79 || (code == REFRESH_FROM_CLIENT_BY_SERVER) 80 || (code == ONE_WAY_FROM_SERVER_BY_SERVER) 81 || (code == REFRESH_FROM_SERVER_BY_SERVER) 82 ); 83 } 84 85 97 static public boolean isClientOnlyCode(int code) { 98 return ( (code == ONE_WAY_FROM_CLIENT) 99 || (code == REFRESH_FROM_CLIENT) 100 ); 101 } 102 103 } 104 | Popular Tags |