Interface ObjectNameEncoder
- All Known Implementing Classes:
ObjectNameEncoderAccessor.DefaultObjectNameEncoder
public interface ObjectNameEncoder
Defines methods that should be used to encode and decode values included within an
ObjectName. It is necessary to encode the values used in the ObjectNames
since they may contain illegal characters, such as colon (:), equals
(=) and question mark (?).
This class should only be used to encode the actual values within an ObjectName,
as indicated in bold in the following example: domain:key1=value1,key2=value2.
An instance of an ObjectNameEncoder should not be constructed directly, instead
it is recommended that the ObjectNameEncoderAccessor
is used instead.
-
Method Summary
Modifier and TypeMethodDescriptiondecodeValue(String encodedValue) Decodes anObjectNamevalue that was encoded with theencodeValue(String)method.encodeValue(String value) Encodes the specified value so that it can be included within anObjectName.
-
Method Details
-
encodeValue
Encodes the specified value so that it can be included within an
ObjectName.- Parameters:
value- The value to be encoded.- Returns:
- The encoded value.
-
decodeValue
Decodes an
ObjectNamevalue that was encoded with theencodeValue(String)method.- Parameters:
encodedValue- The value to be decoded.- Returns:
- The decoded value.
-