JBoss Managed Parent POM 2.1.1.SP2

org.jboss.managed.spi.factory
Interface InstanceClassFactory<T>

Type Parameters:
T - actual attachment type
All Known Implementing Classes:
AbstractInstanceClassFactory, DefaultInstanceClassFactory

public interface InstanceClassFactory<T>

A plugin for obtaining the class to scan for management object related annotations, converting property values to/from MetaValue, and determining runtime component names.

Version:
$Revision: 80512 $
Author:
Scott.Stark@jboss.org, Ales.Justin@jboss.org

Method Summary
 Object getComponentName(org.jboss.beans.info.spi.BeanInfo beanInfo, ManagedProperty property, T attachment, MetaValue value)
          Get the runtime component name.
 Class<?> getManagedObjectClass(T attachment)
          Return the Class that represents the root ManagedObject to scan for management object related annotations.
 Class<T> getType()
           
 MetaValue getValue(org.jboss.beans.info.spi.BeanInfo beanInfo, ManagedProperty property, org.jboss.metadata.spi.MetaData metaData, T attachment)
          Get the value from object.
 void setValue(org.jboss.beans.info.spi.BeanInfo beanInfo, ManagedProperty property, T attachment, MetaValue value)
          Set the property value to attachment object.
 

Method Detail

getType

Class<T> getType()

getManagedObjectClass

Class<?> getManagedObjectClass(T attachment)
                               throws ClassNotFoundException
Return the Class that represents the root ManagedObject to scan for management object related annotations.

Parameters:
attachment - - the instance a ManagedObject is to be created for.
Returns:
the Class that represents the root ManagedObject.
Throws:
ClassNotFoundException - if MO class not found

getValue

MetaValue getValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
                   ManagedProperty property,
                   org.jboss.metadata.spi.MetaData metaData,
                   T attachment)
Get the value from object.

Parameters:
beanInfo - managed object's bean info
property - managed property being set
attachment - - the object which own's the property
Returns:
value - the meta value form of the property value

setValue

void setValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
              ManagedProperty property,
              T attachment,
              MetaValue value)
Set the property value to attachment object.

Parameters:
beanInfo - managed object's bean info
property - managed property being set
attachment - - the object which own's the property
value - - the meta value form of the property value

getComponentName

Object getComponentName(org.jboss.beans.info.spi.BeanInfo beanInfo,
                        ManagedProperty property,
                        T attachment,
                        MetaValue value)
Get the runtime component name.

Parameters:
beanInfo - managed object's bean info
property - managed property being set
attachment - - the object which own's the property
value - - the meta value form of the property value
Returns:
the name of the runtime object which is associated with the property. May be null if no such component exists.

JBoss Managed Parent POM 2.1.1.SP2

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.