org.jboss.managed.api.factory
Class ManagedObjectFactory

java.lang.Object
  extended by org.jboss.managed.api.factory.ManagedObjectFactory
Direct Known Subclasses:
AbstractManagedObjectFactory

public abstract class ManagedObjectFactory
extends Object

ManagedObjectFactory.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Constructor Summary
ManagedObjectFactory()
           
 
Method Summary
abstract
<T extends Serializable>
ManagedObject
createManagedObject(Class<T> clazz)
          Create a shell managed object from the given class
static ManagedObjectFactory getInstance()
          Get the managed object factory instance
abstract
<T extends Serializable>
InstanceClassFactory<T>
getInstanceClassFactory(Class<T> clazz)
          Get the InstanceClassFactory for an instance type.
abstract  ManagedObject initManagedObject(Serializable object, String name, String nameType)
          Create a managed object from the given object
abstract  void setBuilder(Class<?> clazz, ManagedObjectBuilder builder)
          Set a managed object builder
abstract
<T extends Serializable>
void
setInstanceClassFactory(Class<T> clazz, InstanceClassFactory<T> factory)
          Set the InstanceClassFactory for an instance type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedObjectFactory

public ManagedObjectFactory()
Method Detail

getInstance

public static ManagedObjectFactory getInstance()
Get the managed object factory instance

Returns:
the instance

initManagedObject

public abstract ManagedObject initManagedObject(Serializable object,
                                                String name,
                                                String nameType)
Create a managed object from the given object

Parameters:
object - the object
name - - the name of the managed object. If null, the name will be derived from the object annotations or attachment name.
nameType - - the name of the managed object. If null, the name will be derived from the object annotations or default to "".
Returns:
the managed object
Throws:
IllegalArgumentException - for a null object
See Also:
ManagementObjectID

createManagedObject

public abstract <T extends Serializable> ManagedObject createManagedObject(Class<T> clazz)
Create a shell managed object from the given class

Type Parameters:
T - the class
Parameters:
clazz - the class
Returns:
the managed object
Throws:
IllegalArgumentException - for a null class

setBuilder

public abstract void setBuilder(Class<?> clazz,
                                ManagedObjectBuilder builder)
Set a managed object builder

Parameters:
clazz - the class
builder - the builder (null to remove the builder)

setInstanceClassFactory

public abstract <T extends Serializable> void setInstanceClassFactory(Class<T> clazz,
                                                                      InstanceClassFactory<T> factory)
Set the InstanceClassFactory for an instance type.

Type Parameters:
T - the class type
Parameters:
clazz - the class
factory - - the factory used to obtain the class to scan for management annotations.

getInstanceClassFactory

public abstract <T extends Serializable> InstanceClassFactory<T> getInstanceClassFactory(Class<T> clazz)
Get the InstanceClassFactory for an instance type.

Type Parameters:
T - the class type
Parameters:
clazz - the class
Returns:
the factory used to obtain the class to scan for management annotations.


Copyright © 2008 JBoss Inc.. All Rights Reserved.