|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.apache.qpid.management.domain.model.QpidEntity
org.apache.qpid.management.domain.model.QpidClass
class QpidClass
Qpid Class definition. A type definition for a manageable object. This class is also responsible to manage incoming obejct instance data (configuration & instrumentation). How can we handle data before schema is injected into this class? simply we must retain that data in raw format. This class has 3 states : 1) first state is when schema is not yet injected. In this case the incoming object data is retained as is (in raw format) and a schema request is sent; 2) second state is when schema has been requested but not yet injected. The incoming object data is still retained as is (in raw format) 3) third state is when schema is injected. Each injection of data will result in an update / create / delete of the corresponding object instance. In addition, the first time the state change, the old retained raw data is cnverted in object instance(s).
Nested Class Summary | |
---|---|
(package private) class |
QpidClass.QManManagedObject
MBean used for representing remote broker object instances. |
(package private) static interface |
QpidClass.State
State interface for this class definition. |
Nested classes/interfaces inherited from class org.apache.qpid.management.domain.model.QpidEntity |
---|
QpidEntity.QManManagedEntity |
Field Summary | |
---|---|
(package private) Map<Binary,QpidClass.QManManagedObject> |
_objectInstances
|
(package private) Map<String,QpidProperty> |
_properties
|
(package private) QpidClass.State |
_schemaInjected
After a schema is built into this definition this is the current state of the class. |
(package private) QpidClass.State |
_schemaNotRequested
This is the initial state of every qpid class. |
(package private) QpidClass.State |
_schemaRequestedButNotYetInjected
This is the first state of this class definition : the schema is not yet injected so each injection of object data will be retained in raw format. |
(package private) QpidClass.State |
_state
|
(package private) Map<String,QpidStatistic> |
_statistics
|
Fields inherited from class org.apache.qpid.management.domain.model.QpidEntity |
---|
_hash, _logger, _metadata, _name, _objectName, _parent, _service, JMX_SERVICE |
Constructor Summary | |
---|---|
QpidClass(String className,
Binary hash,
QpidPackage parentPackage)
Builds a new class with the given name and package as parent. |
Method Summary | |
---|---|
(package private) void |
addConfigurationData(Binary objectId,
byte[] rawData)
Adds the instrumentation data for the object instance associated to the given object identifier. |
(package private) void |
addInstrumentationData(Binary objectId,
byte[] rawData)
Adds the configuration data for the object instance associated to the given object identifier. |
(package private) void |
buildAttributes(List<Map<String,Object>> props,
List<Map<String,Object>> stats,
MBeanAttributeInfo[] attributes)
Internal method used for building attributes definitions. |
(package private) void |
buildMethods(List<MethodOrEventDataTransferObject> definitions,
MBeanOperationInfo[] operationsMetadata)
Internal method used for building method defintiions. |
(package private) QpidClass.QManManagedObject |
getObjectInstance(Binary objectId,
boolean registration)
Returns the object instance associated to the given identifier. |
(package private) void |
releaseResources()
Deregisters all the object instances and release all previously acquired resources. |
(package private) void |
removeObjectInstance(Binary objectId)
Removes the object instance associated to the given identifier. |
(package private) void |
setSchema(List<Map<String,Object>> propertyDefinitions,
List<Map<String,Object>> statisticDefinitions,
List<MethodOrEventDataTransferObject> methodDefinitions)
Sets the schema for this class definition. |
String |
toString()
|
(package private) void |
updateInstanceWithConfigurationData(QpidClass.QManManagedObject instance,
byte[] rawData)
Updates the given obejct instance with the given incoming configuration data. |
(package private) void |
updateInstanceWithInstrumentationData(QpidClass.QManManagedObject instance,
byte[] rawData)
Updates the given object instance with the given incoming instrumentation data. |
Methods inherited from class org.apache.qpid.management.domain.model.QpidEntity |
---|
getName, getPackageName, requestSchema |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.qpid.management.domain.model.QpidClassMBean |
---|
getName, getPackageName |
Field Detail |
---|
final QpidClass.State _schemaNotRequested
final QpidClass.State _schemaRequestedButNotYetInjected
final QpidClass.State _schemaInjected
Map<String,QpidProperty> _properties
Map<String,QpidStatistic> _statistics
Map<Binary,QpidClass.QManManagedObject> _objectInstances
QpidClass.State _state
Constructor Detail |
---|
QpidClass(String className, Binary hash, QpidPackage parentPackage)
className
- the name of the class.hash
- the class schema hash.parentPackage
- the parent of this class.Method Detail |
---|
void addInstrumentationData(Binary objectId, byte[] rawData)
objectId
- the object identifier.rawData
- the raw configuration data.void addConfigurationData(Binary objectId, byte[] rawData)
objectId
- the object identifier.rawData
- the raw instrumentation data.void setSchema(List<Map<String,Object>> propertyDefinitions, List<Map<String,Object>> statisticDefinitions, List<MethodOrEventDataTransferObject> methodDefinitions) throws UnableToBuildFeatureException
propertyDefinitions
- properties metadata.statisticDefinitions
- statistics metadata.methodDefinitions
- methods metadata.
UnableToBuildFeatureException
- when some error occurs while parsing the incoming schema.void buildAttributes(List<Map<String,Object>> props, List<Map<String,Object>> stats, MBeanAttributeInfo[] attributes) throws UnableToBuildFeatureException
props
- the map contained in the properties schema.stats
- the map contained in the statistics schema.attributes
- the management metadata for attributes.
UnableToBuildFeatureException
- when it's not possibile to build one attribute definition.QpidClass.QManManagedObject getObjectInstance(Binary objectId, boolean registration)
objectId
- the object identifier.registration
- a flag indicating whenever the (new ) instance must be registered with MBean server.
void buildMethods(List<MethodOrEventDataTransferObject> definitions, MBeanOperationInfo[] operationsMetadata) throws UnableToBuildFeatureException
definitions
- the properties map contained in the incoming schema.operationsMetadata
-
UnableToBuildFeatureException
- when it's not possibile to build one or more definitions.void updateInstanceWithConfigurationData(QpidClass.QManManagedObject instance, byte[] rawData)
instance
- the managed object instance.rawData
- the incoming configuration data which contains new values for instance properties.void updateInstanceWithInstrumentationData(QpidClass.QManManagedObject instance, byte[] rawData)
instance
- the managed object instance.rawData
- the incoming instrumentation data which contains new values for instance properties.public String toString()
toString
in class Object
void removeObjectInstance(Binary objectId)
objectId
- the object identifier.void releaseResources()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |