public class RuntimeState extends TieSystemObject
Modifier and Type | Class and Description |
---|---|
static class |
RuntimeState.Status
Enumeration for the various statuses.
|
Modifier and Type | Field and Description |
---|---|
static String |
CLASS_NAME
The name of the ClassObject representing this class.
|
static String |
CONFIGURATIONBUNDLE_ATTRIBUTE
Name of the ConfigurationBundle Attribute.
|
static String |
CONFIGURATIONNAME_ATTRIBUTE
Name of the ConfigurationName Attribute.
|
static String |
CONFIGURATIONOVERRIDEBUNDLE_ATTRIBUTE
Name of the ConfigurationOverrideBundle Attribute.
|
static String |
CONTROLLERALERT_ATTRIBUTE
Name of the ControllerAlert Attribute.
|
static String |
CONTROLLERREPLY_ATTRIBUTE
Name of the ControllerReply Attribute.
|
static String |
CONTROLLERREQUEST_ATTRIBUTE
Name of the ControllerRequest Attribute.
|
static String |
CREATEDATE_ATTRIBUTE
Name of the CreateDate Attribute.
|
static String |
DISPOSEDATE_ATTRIBUTE
Name of the DisposeDate Attribute.
|
static String |
MANAGINGNODESTATE_ATTRIBUTE
Name of the Attribute which holds the managing NodeState.
|
static String |
NAME_ATTRIBUTE
Name of the Name Attribute.
|
static String |
RUNTIMESTATEBUNDLE_ATTRIBUTE
Name of the RuntimeStateBundle Attribute.
|
static String |
STATEPROPERTYTABLE_ATTRIBUTE
Name of the StatePropertyTable Attribute.
|
static String |
STATUS_ATTRIBUTE
Name of the Status Attribute.
|
static int |
STATUSCODE_DISPOSED
The ControllerRequest code to Resume an object after it was subsequently Suspended.
|
static int |
STATUSCODE_FINALIZED
The ControllerRequest code to apply configuration overrides to an object.
|
static int |
STATUSCODE_RUNNING
The ControllerRequest code to Start an object after it was subsequently stopped.
|
static int |
STATUSCODE_STARTING
The ControllerRequest code to Restart an object.
|
static int |
STATUSCODE_STOPPED
The ControllerRequest code to Start an object for the first time,
also known as "Load and Start" for Servers.
|
static int |
STATUSCODE_STOPPING
The ControllerRequest code to Stop an object after it was subsequently stopped.
|
static int |
STATUSCODE_SUSPENDED
The ControllerRequest code to Suspend an object taht is running.
|
static int |
STATUSCODE_UNKNOWN
The ControllerRequest code that indicates no request is in progress.
|
static String |
STATUSDATE_ATTRIBUTE
Name of the StatusDate Attribute.
|
ACTIVE_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, POLICYLISTS_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE
DOMAIN_UNIQUENAME_DEFAULT_DELIMITER, m_ClassId, m_Id, m_Session
Modifier | Constructor and Description |
---|---|
protected |
RuntimeState(LibrarySession session,
Long id,
Long classId,
S_LibraryObjectData data)
Constructs a RuntimeState object.
|
Modifier and Type | Method and Description |
---|---|
void |
addStateProperty(String key,
AttributeValue val)
Adds (or replaces) a state property.
|
AuditEvent[] |
getAuditEvents()
Gets all audit events that have been posted on the target.
|
PropertyBundle |
getConfigurationBundle()
Returns the Configuration PropertyBundle that is used to reflect the
initial configuration.
|
String |
getConfigurationName()
Returns the name of the Configuration object used to create the
runtime object reflected by this RuntimeState.
|
protected String |
getConfigurationOverrideAuditEventKey()
Gets the Audit Event key to use for posting configuration overrides.
|
PropertyBundle |
getConfigurationOverrideBundle()
Returns the Configuration Override PropertyBundle that is used to reflect
any overrides to the initial configuration.
|
AttributeValue |
getConfigurationOverridePropertyValue(String key)
Returns a configuration override property from the
Configuration Override PropertyBundle.
|
AttributeValue |
getConfigurationPropertyValue(String key)
Returns a configuration property from the Configuration PropertyBundle.
|
ControllerAlert |
getControllerAlert()
Returns the ControllerAlert in effect for this instance.
|
ControllerReply |
getControllerReply()
Returns the ControllerReply in effect for this instance.
|
ControllerRequest |
getControllerRequest()
Returns the ControllerRequest in effect for this instance.
|
Date |
getCreateDate()
Returns the date this object was created.
|
Date |
getDisposeDate()
Returns the date when the Runtime object reflected by this
RuntimeState was disposed.
|
NodeState |
getManagingNodeState()
Returns the NodeState corresponding to the Node
that is managing this instance.
|
NodeState |
getNodeState()
Returns the NodeState that is intended to manage the instance.
|
String |
getRuntimeClassification()
Returns the runtime classification fragment used by the Controller to
assign this instance.
|
PropertyBundle |
getRuntimeStateBundle()
Returns the Runtime State PropertyBundle that is used to reflect the
state of the running object.
|
AttributeValue |
getRuntimeStatePropertyValue(String key)
Returns a runtime state property from the runtime state PropertyBundle.
|
static RuntimeState[] |
getRuntimeStates(LibrarySession session)
Selects the set of RuntimeState instances that are active.
|
AttributeValue |
getStateProperty(String key)
Returns the value of a state property from the StatePropertyTable.
|
SimplePropertyTable |
getStatePropertyTable()
Returns the State Property Table (as an embedded SimplePropertyTable)
that is used to reflect the state of the runtime object.
|
AttributeValueTable |
getStatePropertyTableSnapshot()
Returns a static snapshot of the State Property Table.
|
RuntimeState.Status |
getStatus()
Gets the status of the RuntimeState (enumerated).
|
int |
getStatusCode()
Gets the status code of the RuntimeState (enumerated).
|
Date |
getStatusDate()
Returns the date this object last experienced a Status change.
|
String |
getStatusName()
Gets the name of the status of the marking (enumerated).
|
boolean |
hasNameAttribute()
Returns true if this object is an instance of a class
that has a NAME attribute, and false otherwise.
|
boolean |
isAssigned()
Gets indication as to whether this instance was assigned by the Controller.
|
boolean |
isControllerReplyActive()
Returns true if there is an active ControllerReply
in effect for this instance.
|
boolean |
isControllerRequestActive()
Returns true if there is an active ControllerRequest
in effect for this instance.
|
boolean |
isDisposed()
Returns true if this instance is disposed.
|
boolean |
isFinalized()
Returns true if this instance is finalized.
|
boolean |
isRunning()
Returns true if this instance has the status of RUNNING.
|
boolean |
isStopped()
Returns true if this instance has the status of STOPPED.
|
boolean |
isStopping()
Returns true if this instance has the status of STOPPING.
|
AuditEvent |
postAuditEvent(String eventKey)
Posts an audit event, without any properties.
|
AuditEvent |
postAuditEvent(String eventKey,
AttributeValue[] props)
Posts an audit event, with the specified properties.
|
AuditEvent |
postAuditEvent(String eventKey,
Long auxNumber)
Posts an audit event, without any properties.
|
AuditEvent |
postAuditEvent(String eventKey,
String auxString)
Posts an audit event, without any properties.
|
AuditEvent |
postAuditEvent(String eventKey,
String auxString,
Long auxNumber,
AttributeValue[] props)
Posts an audit event, with the specified properties.
|
void |
postConfigurationOverrideRequest(AttributeValueTable overrides)
Posts configuration override request for this RuntimeState.
|
protected void |
preFree(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the
permanent deletion ("free") of a object.
|
void |
putConfigurationOverrideProperty(String name,
AttributeValue av)
Adds a Property to the Configuration override PropertyBundle.
|
void |
putConfigurationProperty(String name,
AttributeValue av)
Adds a Property to the Configuration PropertyBundle.
|
void |
putRuntimeStateProperty(String name,
AttributeValue av)
Adds a Property to the runtime state PropertyBundle.
|
void |
removeAllConfigurationOverrideProperties()
Removes all Configuration Override Properties.
|
void |
removeAllConfigurationProperties()
Removes all Configuration Properties.
|
void |
removeAllRuntimeStateProperties()
Removes all runtime state Properties.
|
void |
removeAllStateProperties()
Removes all state properties.
|
void |
removeConfigurationOverrideProperty(String name)
Removes a Configuration Override Property.
|
void |
removeConfigurationProperty(String name)
Removes a Configuration Property.
|
void |
removeRuntimeStateProperty(String name)
Removes a runtime state Property.
|
void |
removeStateProperty(String key)
Removes a state property.
|
void |
setConfigurationBundle(PropertyBundle bundle)
Sets the Configuration PropertyBundle.
|
void |
setConfigurationOverrideBundle(PropertyBundle bundle)
Sets the Configuration Override PropertyBundle.
|
void |
setStatus(RuntimeState.Status status)
Sets a status.
|
void |
setStatusCode(int statusCode)
Sets a new status code.
|
void |
setStatusDisposed()
Sets a status of "Disposed".
|
void |
setStatusFinalized()
Sets a status of "Finalized".
|
void |
setStatusRunning()
Sets a status of "Running".
|
void |
setStatusStarting()
Sets a status of "Starting".
|
void |
setStatusStopped()
Sets a status of "Stopped".
|
void |
setStatusStopping()
Sets a status of "Stopping".
|
void |
setStatusSuspended()
Sets a status of "Suspended".
|
void |
updateControllerReplyForAcknowledge()
Update the instance's ControllerReply to respond with a simple "acknowledge" (ACK).
|
void |
updateControllerReplyForNonAcknowledge()
Update the instance's ControllerReply to respond with a simple "non-acknowledge" (NACK).
|
void |
updateForSimpleControllerAlert(int code)
Update the instance's ControllerAlert to post a simple alert.
|
void |
updateForSimpleControllerAlert(int code,
ControllerJob job)
Update the instance's ControllerAlert to post a simple alert,
along with an optional associated ControllerJob.
|
void |
updateForSimpleControllerJob(ControllerJob job)
Update the instance's ControllerRequest to place a simple ControllerJob.
|
void |
updateForSimpleControllerReply(int code)
Update the instance's ControllerReply to respond with a simple reply.
|
void |
updateForSimpleControllerRequest(int code)
Update the instance's ControllerRequest to place a simple request.
|
void |
updateForSimpleControllerRequest(int code,
ControllerJob job)
Update the instance's ControllerRequest to place a simple request.
|
addCategory, constructSystemObject, constructSystemObjectVector, free, freeCategories, getCategories, getCategories, getCategories, getCategories, getPolicyBundle, getPolicyLists, handleCreate, hasPropertyBundleAttribute, isActive, postCreate, postUpdate, preCreate, preUpdate, putPolicy, removeAllPolicies, removePolicy, removePolicy, setActive, setPolicyBundle, setPolicyLists
added, addSimpleProperty, addSimpleProperty, applyProperties, auditCreated, auditUpdated, canPurge, checkIfPropertyBundleSupported, checkRequiredAttributeSet, clearCopyContext, clearFreeContext, clearUpdateContext, compareTo, constructIdArray, constructIdArray, constructLibraryObject, constructLibraryObjectVector, createDedicatedPropertyBundle, createInstance, deriveDomainUniqueName, dispose, equals, equals, free, freeAll, get, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getAuditDomainContext, getAuditEventFolderContext, getClassId, getClassname, getClassName, getClassObject, getCommonName, getCommonNameAndClass, getCopyContext, getCreateContext, getData, getDefinition, getDefinitionForSimplePropertyUpdates, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getFreeContext, getId, getLabel, getName, getObjectReferenceAttribute, getOperationActionSpecificationContext, getPropertyBundle, getPropertyValue, getPublicObjectAttribute, getResourceString, getResourceString, getSchemaObjectAttribute, getSession, getSessionInterface, getSharedStateFactory, getSimpleObjectAttribute, getSimpleProperties, getSimpleProperty, getSimplePropertyValue, getStringIdentifier, getSystemObjectAttribute, getTraceLogger, getUpdateContext, handleAdminModeChange, handleEvent, handleFree, handleUpdate, hashCode, invalidateState, invokeOperation, invokeOperation, invokeServerMethod, isConnected, isCoreEventPostingEnabled, isInstanceOf, isPersistent, isTraced, isValidEventType, lockRows, lookupInstanceLabel, performPostCreateExtensions, performPostFreeExtensions, performPostUpdateExtensions, performPreCreateExtensions, performPreFreeExtensions, performPreUpdateExtensions, postEvent, postEvent, postFree, prePostAuditEvent, putProperty, putProperty, removeAllProperties, removeAllSimpleProperties, removeAllSimpleProperties, removed, removeProperty, removeSimpleProperty, removeSimpleProperty, renderAsRandomAccessContent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setCopyContext, setFreeContext, setId, setName, setPropertyBundle, setPropertyValue, setUpdateContext, toString, trace, trustHandleCreate, trustHandleCreateAsAdmin, trustHandleFree, trustHandleFreeAsAdmin, trustHandleUpdate, trustHandleUpdateAsAdmin, update, updateAndExposeDefinition, validatePropertyValues, vectorLibraryObjectElement, vectorToLibraryObjectArray, verifyAdministrationMode, verifyConnected, verifyPersistent, verifySystemUserAccess, verifyTargetObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAttributeByUpperCaseName, getClassId, getId, getSessionInterface
getTraceLogger, isTraced, trace
public static final String CLASS_NAME
public static final String NAME_ATTRIBUTE
public static final String CONFIGURATIONNAME_ATTRIBUTE
public static final String STATUS_ATTRIBUTE
public static final String STATUSDATE_ATTRIBUTE
public static final String CREATEDATE_ATTRIBUTE
public static final String DISPOSEDATE_ATTRIBUTE
public static final String CONFIGURATIONBUNDLE_ATTRIBUTE
public static final String CONFIGURATIONOVERRIDEBUNDLE_ATTRIBUTE
public static final String RUNTIMESTATEBUNDLE_ATTRIBUTE
public static final String STATEPROPERTYTABLE_ATTRIBUTE
public static final String MANAGINGNODESTATE_ATTRIBUTE
public static final String CONTROLLERREQUEST_ATTRIBUTE
public static final String CONTROLLERREPLY_ATTRIBUTE
public static final String CONTROLLERALERT_ATTRIBUTE
public static final int STATUSCODE_UNKNOWN
public static final int STATUSCODE_STOPPED
public static final int STATUSCODE_RUNNING
public static final int STATUSCODE_STOPPING
public static final int STATUSCODE_STARTING
public static final int STATUSCODE_SUSPENDED
public static final int STATUSCODE_DISPOSED
public static final int STATUSCODE_FINALIZED
protected RuntimeState(LibrarySession session, Long id, Long classId, S_LibraryObjectData data) throws IfsException
session
- current LibrarySessionid
- object idclassId
- class iddata
- data componentIfsException
- if the operation failspublic boolean hasNameAttribute() throws IfsException
LibraryObject
hasNameAttribute
in class LibraryObject
IfsException
- if operation fails.public String getConfigurationName() throws IfsException
IfsException
- if the operation fails.public int getStatusCode() throws IfsException
IfsException
- if the operation failspublic RuntimeState.Status getStatus() throws IfsException
IfsException
- if the operation failspublic String getStatusName() throws IfsException
IfsException
- if the operation failspublic Date getStatusDate() throws IfsException
IfsException
- if the operation failspublic Date getCreateDate() throws IfsException
IfsException
- if the operation failspublic Date getDisposeDate() throws IfsException
IfsException
- if the operation failspublic boolean isRunning() throws IfsException
IfsException
- if the operation failspublic boolean isStopped() throws IfsException
IfsException
- if the operation failspublic boolean isStopping() throws IfsException
IfsException
- if the operation failspublic boolean isDisposed() throws IfsException
IfsException
- if the operation failspublic boolean isFinalized() throws IfsException
IfsException
- if the operation failspublic NodeState getManagingNodeState() throws IfsException
IfsException
- if operation failspublic NodeState getNodeState() throws IfsException
This is overridden by ServerState and HandlerState to return the NodeState that is specified by the Controller when requesting to Start a Server or Handler. For all other RuntimeState subclasses (namely NodeState and ServiceState), this returns the Managing Node.
IfsException
- if operation failspublic ControllerRequest getControllerRequest() throws IfsException
Returns null if no ControllerRequest is present.
IfsException
- if operation failspublic ControllerReply getControllerReply() throws IfsException
Returns null if no ControllerReply is present.
IfsException
- if operation failspublic ControllerAlert getControllerAlert() throws IfsException
Returns null if no ControllerAlert is present.
IfsException
- if operation failspublic boolean isControllerRequestActive() throws IfsException
This performs additional checks to eliminate any potentially stale data from the cache in making this determination. It has the side effect of clearing the target object and its ControllerRequest from the data cache.
IfsException
- if operation failspublic boolean isControllerReplyActive() throws IfsException
This performs additional checks to eliminate any potentially stale data from the cache in making this determination. It has the side effect of clearing the target object and its ControllerReply from the data cache.
IfsException
- if operation failspublic boolean isAssigned() throws IfsException
Always returns false for RuntimeStates other than ServerState and HandlerState.
IfsException
- if operation failspublic String getRuntimeClassification() throws IfsException
Always returns null for RuntimeStates other than ServerState and HandlerState.
IfsException
- if operation failspublic PropertyBundle getConfigurationBundle() throws IfsException
Returns null if no PropertyBundle is present.
IfsException
- if operation failspublic AttributeValue getConfigurationPropertyValue(String key) throws IfsException
key
- the property's keyIfsException
- if the operation failspublic PropertyBundle getConfigurationOverrideBundle() throws IfsException
Returns null if no PropertyBundle is present.
IfsException
- if operation failspublic AttributeValue getConfigurationOverridePropertyValue(String key) throws IfsException
key
- the property's keyIfsException
- if the operation failspublic static RuntimeState[] getRuntimeStates(LibrarySession session) throws IfsException
The RuntimeState objects will be sorted by ID.
session
- session contextIfsException
- if operation failspublic PropertyBundle getRuntimeStateBundle() throws IfsException
Returns null if no PropertyBundle is present.
IfsException
- if operation failspublic AttributeValue getRuntimeStatePropertyValue(String key) throws IfsException
key
- the property's keyIfsException
- if the operation failspublic SimplePropertyTable getStatePropertyTable() throws IfsException
IfsException
- if operation failspublic AttributeValueTable getStatePropertyTableSnapshot() throws IfsException
IfsException
- if operation failspublic AttributeValue getStateProperty(String key) throws IfsException
key
- the state property keyIfsException
- if operation failspublic void addStateProperty(String key, AttributeValue val) throws IfsException
key
- the state property keyval
- the value of the state propertyIfsException
- if operation failspublic void removeStateProperty(String key) throws IfsException
key
- the state property keyIfsException
- if operation failspublic void removeAllStateProperties() throws IfsException
IfsException
- if operation failspublic void setStatusCode(int statusCode) throws IfsException
statusCode
- the new Status codeIfsException
- if operation failspublic void setStatus(RuntimeState.Status status) throws IfsException
status
- the new StatusIfsException
- if operation failspublic void setStatusStopped() throws IfsException
IfsException
- if operation failspublic void setStatusRunning() throws IfsException
IfsException
- if operation failspublic void setStatusStopping() throws IfsException
IfsException
- if operation failspublic void setStatusStarting() throws IfsException
IfsException
- if operation failspublic void setStatusSuspended() throws IfsException
IfsException
- if operation failspublic void setStatusDisposed() throws IfsException
IfsException
- if operation failspublic void setStatusFinalized() throws IfsException
IfsException
- if operation failspublic void setConfigurationBundle(PropertyBundle bundle) throws IfsException
bundle
- the Configuration bundle settingIfsException
- if operation failspublic void putConfigurationProperty(String name, AttributeValue av) throws IfsException
name
- the name of the new propertyav
- the value of the new propertyIfsException
- if operation failspublic void removeConfigurationProperty(String name) throws IfsException
name
- the name of the property to removeIfsException
- if operation failspublic void removeAllConfigurationProperties() throws IfsException
IfsException
- if operation failspublic void setConfigurationOverrideBundle(PropertyBundle bundle) throws IfsException
bundle
- the Configuration override bundle settingIfsException
- if operation failspublic void putConfigurationOverrideProperty(String name, AttributeValue av) throws IfsException
name
- the name of the new propertyav
- the value of the new propertyIfsException
- if operation failspublic void removeConfigurationOverrideProperty(String name) throws IfsException
name
- the name of the property to removeIfsException
- if operation failspublic void removeAllConfigurationOverrideProperties() throws IfsException
IfsException
- if operation failspublic void putRuntimeStateProperty(String name, AttributeValue av) throws IfsException
name
- the name of the new propertyav
- the value of the new propertyIfsException
- if operation failspublic void removeRuntimeStateProperty(String name) throws IfsException
name
- the name of the property to removeIfsException
- if operation failspublic void removeAllRuntimeStateProperties() throws IfsException
IfsException
- if operation failspublic AuditEvent[] getAuditEvents() throws IfsException
IfsException
- if the operation failspublic AuditEvent postAuditEvent(String eventKey) throws IfsException
eventKey
- the event keyIfsException
- if the operation failspublic AuditEvent postAuditEvent(String eventKey, Long auxNumber) throws IfsException
eventKey
- the event keyauxNumber
- the auxiliary number payloadIfsException
- if the operation failspublic AuditEvent postAuditEvent(String eventKey, String auxString) throws IfsException
eventKey
- the event keyauxString
- the auxiliary String payloadIfsException
- if the operation failspublic AuditEvent postAuditEvent(String eventKey, AttributeValue[] props) throws IfsException
eventKey
- the event keyprops
- the event propertiesIfsException
- if the operation failspublic AuditEvent postAuditEvent(String eventKey, String auxString, Long auxNumber, AttributeValue[] props) throws IfsException
eventKey
- the event keyauxString
- the auxiliary String payloadauxNumber
- the auxiliary number payloadprops
- the event propertiesIfsException
- if the operation failspublic void postConfigurationOverrideRequest(AttributeValueTable overrides) throws IfsException
Uses getConfigurationOverrideAuditEventKey
to
determine the audit event key to use.
overrides
- the configuration overrides to postIfsException
- if the operation failsprotected String getConfigurationOverrideAuditEventKey() throws IfsException
IfsException
- if the operation failsprotected void preFree(LibraryObjectDefinition lodef) throws IfsException
LibraryObject
This method is typically overridden by subclasses that
perform other operations prior to the target object
being freed in order to all delete or modify objects related
to the target object.
Subclasses are expected to invoke super.preFree
.
preFree
in class LibraryObject
lodef
- object definition used to hold options related to the free
operationIfsException
- if operation fails.public void updateForSimpleControllerJob(ControllerJob job) throws IfsException
job
- the ControllerJobIfsException
- if the operation failspublic void updateForSimpleControllerRequest(int code) throws IfsException
A "simple" Request is one that only sets the RequestCode and the RequestDate on the ControllerRequest object.
code
- the Request codeIfsException
- if the operation failspublic void updateForSimpleControllerRequest(int code, ControllerJob job) throws IfsException
A "simple" Request is one that only sets the RequestCode and the RequestDate on the ControllerRequest object.
code
- the Request codejob
- the associated ControllerJob (optional)IfsException
- if the operation failspublic void updateForSimpleControllerReply(int code) throws IfsException
A "simple" Reply is one that only sets the ReplyCode and the ReplyDate on the ControllerReply object.
code
- the Reply codeIfsException
- if the operation failspublic void updateForSimpleControllerAlert(int code) throws IfsException
A "simple" Alert is one that only sets the AlertCode and the AlertDate on the ControllerAlert object.
code
- the Alert codeIfsException
- if the operation failspublic void updateForSimpleControllerAlert(int code, ControllerJob job) throws IfsException
A "simple" Alert is one that only sets the AlertCode and the AlertDate on the ControllerAlert object.
code
- the Alert codejob
- the associated ControllerJob, if anyIfsException
- if the operation failspublic void updateControllerReplyForAcknowledge() throws IfsException
IfsException
- if the operation failspublic void updateControllerReplyForNonAcknowledge() throws IfsException
IfsException
- if the operation failsCopyright © 2023. All rights reserved.