com.esf.core.configuration.service
Class TypedConfigurationData
java.lang.Object
com.esf.core.configuration.service.TypedConfigurationData
public class TypedConfigurationData
- extends java.lang.Object
The @TypedConfigurationData class holds a series of public static final strings that can be used to
represent incoming configuration data in different formats. These are used by the
IConfiguraitonManagerService and its implementation to parse incoming data in various formats properly.
Copyright © 2009 Eurotech Inc. All rights reserved.
Field Summary |
static java.lang.String |
FILE_EXTENSTION_BYTE_ARRAY
The file extension to be used for @ByteArray |
static java.lang.String |
FILE_EXTENSTION_FILE
The file extension to be used for @File |
static java.lang.String |
FILE_EXTENSTION_INPUT_STREAM
The file extension to be used for @InputStream |
static java.lang.String |
FILE_EXTENSTION_OBJECT
The file extension to be used for @Object |
static java.lang.String |
FILE_EXTENSTION_PROPERTIES
The file extension to be used for @Properties |
static java.lang.String |
TCD_BYTE_ARRAY_1
The TCD_BYTE_ARRAY_1 defines a representation of an incoming array of bytes. |
static java.lang.String |
TCD_FILE_BZ2_1
The TCD_FILE_BZ2_1 defines a .bz2 file with one or more files included within it. |
static java.lang.String |
TCD_FILE_TAR_1
The TCD_FILE_TAR_1 defines a .tar file with one or more files included within it. |
static java.lang.String |
TCD_FILE_TGZ_1
The TCD_FILE_TGZ_1 defines a .tgz file with one or more files included within it. |
static java.lang.String |
TCD_FILE_ZIP_1
The TCD_FILE_ZIP_1 defines a .zip file with one or more files included within it. |
static java.lang.String |
TCD_QUERY_STRING_1
The TCD_QUERY_STRING_1 defines a representation of an incoming HTTP query string. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILE_EXTENSTION_FILE
public static final java.lang.String FILE_EXTENSTION_FILE
- The file extension to be used for @File
- See Also:
- Constant Field Values
FILE_EXTENSTION_INPUT_STREAM
public static final java.lang.String FILE_EXTENSTION_INPUT_STREAM
- The file extension to be used for @InputStream
- See Also:
- Constant Field Values
FILE_EXTENSTION_BYTE_ARRAY
public static final java.lang.String FILE_EXTENSTION_BYTE_ARRAY
- The file extension to be used for @ByteArray
- See Also:
- Constant Field Values
FILE_EXTENSTION_OBJECT
public static final java.lang.String FILE_EXTENSTION_OBJECT
- The file extension to be used for @Object
- See Also:
- Constant Field Values
FILE_EXTENSTION_PROPERTIES
public static final java.lang.String FILE_EXTENSTION_PROPERTIES
- The file extension to be used for @Properties
- See Also:
- Constant Field Values
TCD_FILE_ZIP_1
public static final java.lang.String TCD_FILE_ZIP_1
- The TCD_FILE_ZIP_1 defines a .zip file with one or more files included within it. The .zip file
itself must be called tcd_file_zip_1.zip. This tells the ConfigurationManager how to parse the
contents of the file. The files in the .zip file must be of the form:
[bundle_to_be_configured].[type_to_be_converted_to]. For example, the configuration defined to go
to com.esf.device.dummy.service in the form of a Java ByteArray would be called:
com_esf_device_dummy_service.ba
This tells the @IConfigurationManagerService to open a InputStream to the File and convert it to a Java
ByteArray.
- See Also:
- Constant Field Values
TCD_FILE_TGZ_1
public static final java.lang.String TCD_FILE_TGZ_1
- The TCD_FILE_TGZ_1 defines a .tgz file with one or more files included within it. The .tgz file
itself must be called tcd_file_tgz_1.tgz. This tells the ConfigurationManager how to parse the
contents of the file. The files in the .tgz file must be of the form:
[bundle_to_be_configured].[type_to_be_converted_to]. For example, the configuration defined to go
to com.esf.device.dummy.service in the form of a Java ByteArray would be called:
com_esf_device_dummy_service.ba
This tells the @IConfigurationManagerService to open a InputStream to the File and convert it to a Java
ByteArray.
- See Also:
- Constant Field Values
TCD_FILE_TAR_1
public static final java.lang.String TCD_FILE_TAR_1
- The TCD_FILE_TAR_1 defines a .tar file with one or more files included within it. The .tar file
itself must be called tcd_file_tar_1.tar. This tells the ConfigurationManager how to parse the
contents of the file. The files in the .tar file must be of the form:
[bundle_to_be_configured].[type_to_be_converted_to]. For example, the configuration defined to go
to com.esf.device.dummy.service in the form of a Java ByteArray would be called:
com_esf_device_dummy_service.ba
This tells the @IConfigurationManagerService to open a InputStream to the File and convert it to a Java
ByteArray.
- See Also:
- Constant Field Values
TCD_FILE_BZ2_1
public static final java.lang.String TCD_FILE_BZ2_1
- The TCD_FILE_BZ2_1 defines a .bz2 file with one or more files included within it. The .bz2 file
itself must be called tcd_file_bz2_1.bz2. This tells the ConfigurationManager how to parse the
contents of the file. The files in the .bz2 file must be of the form:
[bundle_to_be_configured].[type_to_be_converted_to]. For example, the configuration defined to go
to com.esf.device.dummy.service in the form of a Java ByteArray would be called:
com_esf_device_dummy_service.ba
This tells the @IConfigurationManagerService to open a InputStream to the File and convert it to a Java
ByteArray.
- See Also:
- Constant Field Values
TCD_BYTE_ARRAY_1
public static final java.lang.String TCD_BYTE_ARRAY_1
- The TCD_BYTE_ARRAY_1 defines a representation of an incoming array of bytes. This could be via
an MQTT message or some other mechanism. The format of the incoming bytes must be in the following
form:
1 [TCD_TYPE] - 4 bytes - this is the TCD type (1000 in this case)
2 [NUMBER_OF_COMPONENTS] - 4 bytes - number of components to configure
3 [LENGTH_OF_WHO_CONFIGURATION_IS_FOR] - 2 bytes - length of component name to configure
4 [WHO_CONFIGURATION_IS_FOR] - variable - component symbolic name to configure using '_' instead of '.' plus the type
5 [LENGTH_OF_PAYLOAD] - 4 bytes - length of total payload bytes
6 [PAYLOAD] - variable - configuration payload
- repeat 3 through 6 as needed
7 [CKSUM] - 2 bytes - the complete cksum of the array of bytes
This is an example array of bytes:
1000 - type is TCD_BYTE_ARRAY_1 - should be represented as 4 bytes (i.e. 0x000003E8)
1 - one configuration included in this stream - should be represented as 4 bytes (i.e 0x00000001)
31 - 31 bytes in the name com_esf_device_dummy_service.ba - should be represented as 2 bytes (i.e. 0x001F)
com_esf_device_dummy_service.ba - the symbolic name using '_' instead of '.' plus the conversion extension
15 - 15 bytes in the payload - should be represented as 4 bytes (i.e. 0x0000000F)
my_key=my_value - payload of a key/value pair
0x08AC - the two byte cksum (this is properly represented)
- See Also:
- Constant Field Values
TCD_QUERY_STRING_1
public static final java.lang.String TCD_QUERY_STRING_1
- The TCD_QUERY_STRING_1 defines a representation of an incoming HTTP query string. This could be via
HTTP or some other mechanism. The format of the incoming query string must be in the following form:
1 tcdType=[TCD_QUERY_STRING_X] - this is the TCD_TYPE (2000 in this case)
2 numOfComponents=[NUMBER_OF_COMPONENTS] - number of components to configure
3 componentName=[WHO_CONFIGURATION_IS_FOR] - component symbolic name to configure using '_' instead of '.' plus the type
4 lengthOfPayload=[LENGTH_OF_PAYLOAD] - number of key/value pairs associated with this configuration
5 key=value,key=value,... - key/value pairs associated with this configuration
- repeat 3 through 5 as needed
This is an example:
tcd_type=2000 - specify TCD_QUERY_STRING_1
numOfComponents=1 - 1 component to configure
componentName=com_esf_device_dummy_service.ba - the symbolic name using '_' instead of '.' plus the conversion extension
lengthOfPayload=2 - number of key/value pairs to follow in the payload
my_key1=my_value1 - first key/value pair in payload
my_key2=my_value2 - second key/value pair in payload
- See Also:
- Constant Field Values
TypedConfigurationData
public TypedConfigurationData()