org.apache.qpid.management.domain.handler.base
Class ContentIndicationMessageHandler

java.lang.Object
  extended by org.apache.qpid.management.domain.handler.base.BaseMessageHandler
      extended by org.apache.qpid.management.domain.handler.base.ContentIndicationMessageHandler
All Implemented Interfaces:
IMessageHandler
Direct Known Subclasses:
ConfigurationMessageHandler, InstrumentationMessageHandler

public abstract class ContentIndicationMessageHandler
extends BaseMessageHandler

Base class for content indication message handlers.


Field Summary
 
Fields inherited from class org.apache.qpid.management.domain.handler.base.BaseMessageHandler
_domainModel, _logger
 
Constructor Summary
ContentIndicationMessageHandler()
           
 
Method Summary
(package private)  boolean objectHasBeenRemoved(long deletionTimestamp, long now)
          Checks if the timestamps contained in the message indicate that the object has been removed.
 void process(org.apache.qpid.transport.codec.Decoder decoder, int sequenceNumber)
          Processes the income message.
(package private)  void removeObjectInstance(String packageName, String className, Binary classHash, Binary objectId)
          Removes an object instance from the domain model.
protected abstract  void updateDomainModel(String packageName, String className, Binary classHash, Binary objectId, long timeStampOfCurrentSample, long timeObjectWasCreated, long timeObjectWasDeleted, byte[] contentData)
          Updates domain model with the incoming data.
 
Methods inherited from class org.apache.qpid.management.domain.handler.base.BaseMessageHandler
setDomainModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentIndicationMessageHandler

public ContentIndicationMessageHandler()
Method Detail

process

public final void process(org.apache.qpid.transport.codec.Decoder decoder,
                          int sequenceNumber)
Processes the income message.

Parameters:
decoder - the decoder used to parse the message.
sequenceNumber - the sequence number of the message.

removeObjectInstance

void removeObjectInstance(String packageName,
                          String className,
                          Binary classHash,
                          Binary objectId)
Removes an object instance from the domain model.

Parameters:
packageName - the package name.
className - the class name.
classHash - the class hash.
objectId - the object identifier.

objectHasBeenRemoved

boolean objectHasBeenRemoved(long deletionTimestamp,
                             long now)
Checks if the timestamps contained in the message indicate that the object has been removed.

Parameters:
deletionTimestamp - time object was deleted.
now - timestamp of the current message.
Returns:
true if the object has been removed, false otherwise.

updateDomainModel

protected abstract void updateDomainModel(String packageName,
                                          String className,
                                          Binary classHash,
                                          Binary objectId,
                                          long timeStampOfCurrentSample,
                                          long timeObjectWasCreated,
                                          long timeObjectWasDeleted,
                                          byte[] contentData)
Updates domain model with the incoming data. This is a template method that each concrete subclass must implement in order to update the domain model with the incoming data.

Parameters:
packageName - the name of the package.
className - the name of the class.
objectId - the object identifier.
timeStampOfCurrentSample - timestamp of current sample.
timeObjectWasCreated - time object was created.
timeObjectWasDeleted - time object was deleted.
contentData - object instance incoming data.


Licensed to the Apache Software Foundation