org.apache.qpid.management.domain.model
Class QpidPackage

java.lang.Object
  extended by org.apache.qpid.management.domain.model.QpidPackage

final class QpidPackage
extends Object

Qpid package definition. A grouping of class definitions that are related to a single software component. The package concept is used to extend the management schema beyond just the QPID software components. The name is prefixed with "Qpid" for avoiding name conficts with java.lang.Package.


Nested Class Summary
(package private)  class QpidPackage.QpidClassIdentity
          Qpid class identity.
 
Constructor Summary
QpidPackage(String name, DomainModel parent)
          Builds a new package with the supplied name.
 
Method Summary
(package private)  void addClassDefinition(String className, Binary classHash, List<Map<String,Object>> properties, List<Map<String,Object>> statistics, List<MethodOrEventDataTransferObject> methods)
          Adds a class definition to this package.
(package private)  void addEventDefinition(String eventClassName, Binary classHash, List<Map<String,Object>> arguments)
           
(package private)  boolean alreadyContainsClassDefinition(String className, Binary hash)
          Returns true if this package contains the given class definition.
(package private)  IMethodInvocationListener getMethodInvocationListener()
          Returns the method invocation listener of the corresponing parent domain model.
(package private)  String getName()
          Returns the name of this package.
(package private)  UUID getOwnerId()
          Returns the identifier of the broker which contains this package.
(package private)  QpidClass getQpidClass(String className, Binary hash, boolean store)
          Returns the definition of the class with given name.
(package private)  QpidEvent getQpidEvent(String className, Binary hash, boolean store)
          Returns the definition of the class with given name.
(package private)  void releaseResources()
          Releases all previously acquired resources of this package.
(package private)  void removeObjectInstance(String className, Binary classHash, Binary objectId)
          Removes the object instance associated to the given parameters.
(package private)  void setEventInstanceRawData(String eventName, Binary eventHash, byte[] rawData, long currentTimestamp, int severity)
           
(package private)  void setObjectInstanceConfigurationRawData(String className, Binary classHash, Binary objectId, byte[] rawData)
          Injects into a class the given object instance configuration data.
(package private)  void setObjectInstanceInstrumentationRawData(String className, Binary classHash, Binary objectId, byte[] rawData)
          Injects into a class the given object instance instrumentation data.
 String toString()
          Returns a string representation of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QpidPackage

QpidPackage(String name,
            DomainModel parent)
Builds a new package with the supplied name.

Parameters:
name - the name of the package.
Method Detail

getOwnerId

UUID getOwnerId()
Returns the identifier of the broker which contains this package.

Returns:

getName

String getName()
Returns the name of this package.

Returns:
the name of this package.

addClassDefinition

void addClassDefinition(String className,
                        Binary classHash,
                        List<Map<String,Object>> properties,
                        List<Map<String,Object>> statistics,
                        List<MethodOrEventDataTransferObject> methods)
                  throws UnableToBuildFeatureException
Adds a class definition to this package. The class will be added only if its definition doesn't already exists.

Parameters:
className - the name of the class.
classHash - the class schema hash.
properties - the properties of the class.
statistics - the statistics of the class.
methods - the methods of the class.
events - the events of the class.
Throws:
UnableToBuildFeatureException - when the class definition cannot be built due to a feature build failure.

addEventDefinition

void addEventDefinition(String eventClassName,
                        Binary classHash,
                        List<Map<String,Object>> arguments)
                  throws UnableToBuildFeatureException
Throws:
UnableToBuildFeatureException

alreadyContainsClassDefinition

boolean alreadyContainsClassDefinition(String className,
                                       Binary hash)
Returns true if this package contains the given class definition.

Parameters:
className - the name of the class.
Returns:
true if this package contains the class definition, false otherwise.

setObjectInstanceInstrumentationRawData

void setObjectInstanceInstrumentationRawData(String className,
                                             Binary classHash,
                                             Binary objectId,
                                             byte[] rawData)
Injects into a class the given object instance instrumentation data.

Parameters:
className - the of the class the injected object data belongs to.
objectId - the object identifier.
rawData - the instrumentation data (in raw format).

setObjectInstanceConfigurationRawData

void setObjectInstanceConfigurationRawData(String className,
                                           Binary classHash,
                                           Binary objectId,
                                           byte[] rawData)
Injects into a class the given object instance configuration data.

Parameters:
className - the of the class the injected object data belongs to.
objectId - the object identifier.
rawData - the configuration data (in raw format).

setEventInstanceRawData

void setEventInstanceRawData(String eventName,
                             Binary eventHash,
                             byte[] rawData,
                             long currentTimestamp,
                             int severity)

getQpidClass

QpidClass getQpidClass(String className,
                       Binary hash,
                       boolean store)
Returns the definition of the class with given name.

Parameters:
className - the name of the class.
hash - the class hash.
store - a flag indicating if a just created class must be stored or not.
Returns:
the definition of the class with given name.

getQpidEvent

QpidEvent getQpidEvent(String className,
                       Binary hash,
                       boolean store)
Returns the definition of the class with given name.

Parameters:
className - the name of the class.
hash - the class hash.
store - a flag indicating if a just created class must be stored or not.
Returns:
the definition of the class with given name.

toString

public String toString()
Returns a string representation of this class. That is, this method returns the simple name (not FQN) of this class.

Overrides:
toString in class Object

removeObjectInstance

void removeObjectInstance(String className,
                          Binary classHash,
                          Binary objectId)
Removes the object instance associated to the given parameters.

Parameters:
className - the class definition of the object instance.
classHash - the class hash
objectId - the object identifier.

releaseResources

void releaseResources()
Releases all previously acquired resources of this package.


getMethodInvocationListener

IMethodInvocationListener getMethodInvocationListener()
Returns the method invocation listener of the corresponing parent domain model.

Returns:
the method invocation listener of the corresponing parent domain model.


Licensed to the Apache Software Foundation