public class VmMetaData extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CLOUDEX_EXCEPTION |
static String |
CLOUDEX_MESSAGE |
static String |
CLOUDEX_PREFIX |
static String |
CLOUDEX_STATUS |
static String |
CLOUDEX_TASK_CLASS |
static String |
CLOUDEX_TASK_CODE_TYPE |
static String |
CLOUDEX_TASK_CODE_URL |
static String |
CLOUDEX_VM_PREFIX |
static String |
LONG_METADATA_FILE_Suffix |
static String |
USER_PREFIX |
Constructor and Description |
---|
VmMetaData() |
VmMetaData(Map<String,Object> attributes) |
VmMetaData(Map<String,Object> attributes,
String fingerprint) |
Modifier and Type | Method and Description |
---|---|
VmMetaData |
addUserValue(String key,
String value)
add a user value to the metadata, return this instance for chaining
|
VmMetaData |
addUserValues(Map<String,String> values)
Add a map of user values to the metadata, return this instance for chaining
|
VmMetaData |
addValue(String key,
String value)
add a value to the metadata, return this instance for chaining
|
void |
clearValues() |
void |
exceptionToCloudExError(Exception exception)
From an exception populate a cloudex metadata error
|
Map<String,Object> |
getAttributes() |
String |
getException()
Get the exception if any
|
String |
getFingerprint() |
VmMetaData |
getFollowUp(VmMetaData followUp)
Some cloud providers require that a follow up metadata to contain a fingerprint signature
|
String |
getMessage()
Get the message if any
|
ProcessorStatus |
getProcessorStatus()
Get the processor status enum value
|
String |
getStatus()
Get the status
|
String |
getTaskClass()
Get the processor status
|
CodeLocation |
getTaskCodeType()
Get the task code type
|
String |
getTaskCodeUrl()
Get the url of the the task code, only if status is set to remote
|
Map<String,String> |
getUserMetaData()
Return a map of all the user meta data
|
String |
getValue(String key) |
void |
setException(Exception exp)
Sets the exception class name
|
void |
setFingerprint(String fingerprint) |
void |
setMessage(String message)
Sets the processor error message
|
void |
setProcessorStatus(ProcessorStatus status)
Set the processor status in this metadata
|
void |
setTaskClass(String taskClass)
Set the processor task class
|
void |
setTaskCodeType(CodeLocation codeType)
Set the processor code location type
|
String |
toString() |
public static final String LONG_METADATA_FILE_Suffix
public static final String CLOUDEX_PREFIX
public static final String USER_PREFIX
public static final String CLOUDEX_VM_PREFIX
public static final String CLOUDEX_TASK_CLASS
public static final String CLOUDEX_TASK_CODE_TYPE
public static final String CLOUDEX_TASK_CODE_URL
public static final String CLOUDEX_STATUS
public static final String CLOUDEX_EXCEPTION
public static final String CLOUDEX_MESSAGE
public String getStatus()
public ProcessorStatus getProcessorStatus()
public void setProcessorStatus(ProcessorStatus status)
status
- - the process status ProcessorStatus
public CodeLocation getTaskCodeType()
public void setTaskCodeType(CodeLocation codeType)
codeType
- - the code location CodeLocation
public String getTaskClass()
public void setTaskClass(String taskClass)
taskClass
- - the class name to setpublic String getTaskCodeUrl()
public String getException()
public void setException(Exception exp)
exp
- - the exceptionpublic String getMessage()
public void setMessage(String message)
message
- - the error messagepublic void exceptionToCloudExError(Exception exception)
exception
- - the exceptionpublic Map<String,String> getUserMetaData()
public VmMetaData addValue(String key, String value)
key
- value
- public VmMetaData addUserValue(String key, String value)
key
- value
- public VmMetaData addUserValues(Map<String,String> values)
values
- - the values mapVmMetaData
public void clearValues()
Map.clear()
public String getFingerprint()
public void setFingerprint(String fingerprint)
fingerprint
- the fingerprint to setpublic VmMetaData getFollowUp(VmMetaData followUp)
followUp
- - the metadata to updateCopyright © 2016 iNetria. All rights reserved.