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

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

public class DomainModel
extends Object

Broker domain model. This is the local representation of a remote broker domain model.


Field Summary
(package private)  Map<String,QpidPackage> _packages
          Here the known packages of the remote broker are stored.
 
Constructor Summary
DomainModel(UUID brokerId)
          Builds a new domain model with the given broker identifier.
 
Method Summary
 void addConfigurationRawData(String packageName, String className, Binary classHash, Binary objectId, byte[] rawData)
          Adds the given configuration data (raw format) to this domain model.
 void addEventRawData(String packageName, String eventName, Binary eventHash, byte[] rawData, long currentTimestamp, int severity)
           
 void addEventSchema(String packageName, String className, Binary classHash, List<Map<String,Object>> arguments)
          Adds the specified schema to this domain model.
 void addInstrumentationRawData(String packageName, String className, Binary classHash, Binary objectId, byte[] rawData)
          Adds the given instrumentation data (raw format) to this domain model.
 void addSchema(String packageName, String className, Binary classHash, List<Map<String,Object>> properties, List<Map<String,Object>> statistics, List<MethodOrEventDataTransferObject> methods)
          Adds the specified schema to this domain model.
(package private)  boolean containsPackage(String packageName)
          Returns true if a package with the specified name already exists on this domain model.
 UUID getBrokerId()
          Returns the identifier of the broker associated with this domain model.
 Date getLastRefreshDate()
          Returns the last refresh date.
(package private)  IMethodInvocationListener getMethodInvocationListener()
           
(package private)  QpidPackage getPackageByName(String packageName)
          Gets the package with the specified name.
 void releaseResources()
          Releases all the resources kept by domain model entitiies.
 void removeObjectInstance(String packageName, String className, Binary classHash, Binary objectId)
          Removes the object instance associated to the given parameters.
 void setMethodInvocationListener(IMethodInvocationListener listener)
           
 void updateLastRefreshDate()
          Updates the last refresh date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_packages

Map<String,QpidPackage> _packages
Here the known packages of the remote broker are stored.

Constructor Detail

DomainModel

public DomainModel(UUID brokerId)
Builds a new domain model with the given broker identifier.

Parameters:
brokerId - the broker identifier.
Method Detail

getBrokerId

public UUID getBrokerId()
Returns the identifier of the broker associated with this domain model.

Returns:
the identifier of the broker associated with this domain model.

addSchema

public void addSchema(String packageName,
                      String className,
                      Binary classHash,
                      List<Map<String,Object>> properties,
                      List<Map<String,Object>> statistics,
                      List<MethodOrEventDataTransferObject> methods)
               throws UnableToBuildFeatureException
Adds the specified schema to this domain model.

Parameters:
packageName - the package name.
className - the class name.
classHash - the class schema hash.
properties - the class properties.
statistics - the class statistics.
methods - the class methods.
Throws:
UnableToBuildFeatureException

updateLastRefreshDate

public void updateLastRefreshDate()
Updates the last refresh date.


getLastRefreshDate

public Date getLastRefreshDate()
Returns the last refresh date.

Returns:
the last refresh date.

addEventSchema

public void addEventSchema(String packageName,
                           String className,
                           Binary classHash,
                           List<Map<String,Object>> arguments)
                    throws UnableToBuildFeatureException
Adds the specified schema to this domain model.

Parameters:
packageName - the package name.
className - the class name.
classHash - the class schema hash.
properties - the class properties.
statistics - the class statistics.
methods - the class methods.
Throws:
UnableToBuildFeatureException

getPackageByName

QpidPackage getPackageByName(String packageName)
Gets the package with the specified name. Note that if the package doesn't exist a new one will be created and returned.

Parameters:
packageName - the name of the package.
Returns:
the package.

containsPackage

boolean containsPackage(String packageName)
Returns true if a package with the specified name already exists on this domain model.

Parameters:
packageName - the name of the package.
Returns:
true if the package exists, false otherwise.

addInstrumentationRawData

public void addInstrumentationRawData(String packageName,
                                      String className,
                                      Binary classHash,
                                      Binary objectId,
                                      byte[] rawData)
Adds the given instrumentation data (raw format) to this domain model. Note that this data is belonging to a specific object instance.

Parameters:
packageName - the name of the ower package.
className - the name of the owner class.
classHash - the schema hash for this class.
objectId - the object instance identifier.
rawData - the instrumentation data.

addEventRawData

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

addConfigurationRawData

public void addConfigurationRawData(String packageName,
                                    String className,
                                    Binary classHash,
                                    Binary objectId,
                                    byte[] rawData)
Adds the given configuration data (raw format) to this domain model. Note that this data is belonging to a specific object instance.

Parameters:
packageName - the name of the ower package.
className - the name of the owner class.
classHash - the schema hash for this class.
objectId - the object instance identifier.
rawData - the configuration data.

removeObjectInstance

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

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

releaseResources

public void releaseResources()
Releases all the resources kept by domain model entitiies.


setMethodInvocationListener

public void setMethodInvocationListener(IMethodInvocationListener listener)

getMethodInvocationListener

IMethodInvocationListener getMethodInvocationListener()


Licensed to the Apache Software Foundation