@@ -37,9 +37,9 @@ public final class RegistrationConstants {
37
37
public static final String ACTION_DEREGISTER = "deregister" ;
38
38
39
39
/* message fields */
40
- public static final String FIELD_NAME_MESSAGE_ID = "message-id" ;
41
- public static final String FIELD_NAME_ACTION = "action" ;
42
- public static final String FIELD_NAME_STATUS = "status" ;
40
+ public static final String APP_PROPERTY_MESSAGE_ID = "message-id" ;
41
+ public static final String APP_PROPERTY_ACTION = "action" ;
42
+ public static final String APP_PROPERTY_STATUS = "status" ;
43
43
44
44
public static final String REGISTRATION_ENDPOINT = "registration" ;
45
45
public static final String PATH_SEPARATOR = "/" ;
@@ -67,8 +67,8 @@ public static JsonObject getReply(final int status, final String messageId, fina
67
67
final JsonObject jsonObject = new JsonObject ();
68
68
jsonObject .put (MessageHelper .APP_PROPERTY_TENANT_ID , tenantId );
69
69
jsonObject .put (MessageHelper .APP_PROPERTY_DEVICE_ID , deviceId );
70
- jsonObject .put (RegistrationConstants .FIELD_NAME_STATUS , Integer .toString (status ));
71
- jsonObject .put (RegistrationConstants .FIELD_NAME_MESSAGE_ID , messageId );
70
+ jsonObject .put (RegistrationConstants .APP_PROPERTY_STATUS , Integer .toString (status ));
71
+ jsonObject .put (RegistrationConstants .APP_PROPERTY_MESSAGE_ID , messageId );
72
72
return jsonObject ;
73
73
}
74
74
@@ -77,7 +77,7 @@ public static Message getAmqpReply(final String status, final String messageId,
77
77
final HashMap <String , String > map = new HashMap <>();
78
78
map .put (MessageHelper .APP_PROPERTY_DEVICE_ID , deviceId );
79
79
map .put (MessageHelper .APP_PROPERTY_TENANT_ID , tenantId );
80
- map .put (FIELD_NAME_STATUS , status );
80
+ map .put (APP_PROPERTY_STATUS , status );
81
81
final ApplicationProperties applicationProperties = new ApplicationProperties (map );
82
82
83
83
final ResourceIdentifier address = ResourceIdentifier .from (RegistrationConstants .REGISTRATION_ENDPOINT , tenantId , deviceId );
@@ -92,16 +92,16 @@ public static Message getAmqpReply(final String status, final String messageId,
92
92
93
93
private static JsonObject getRegistrationJson (final String action , final String messageId , final String tenantId , final String deviceId ) {
94
94
final JsonObject msg = new JsonObject ();
95
- msg .put (FIELD_NAME_ACTION , action );
96
- msg .put (FIELD_NAME_MESSAGE_ID , messageId );
95
+ msg .put (APP_PROPERTY_ACTION , action );
96
+ msg .put (APP_PROPERTY_MESSAGE_ID , messageId );
97
97
msg .put (APP_PROPERTY_DEVICE_ID , deviceId );
98
98
msg .put (APP_PROPERTY_TENANT_ID , tenantId );
99
99
return msg ;
100
100
}
101
101
102
102
private static String getAction (final Message msg ) {
103
103
Objects .requireNonNull (msg );
104
- return (String ) getApplicationProperty (msg .getApplicationProperties (), FIELD_NAME_ACTION );
104
+ return (String ) getApplicationProperty (msg .getApplicationProperties (), APP_PROPERTY_ACTION );
105
105
}
106
106
107
107
private RegistrationConstants () {
0 commit comments