org.jboss.managed.plugins
Class DelegateManagedObjectImpl

java.lang.Object
  extended by org.jboss.managed.plugins.DelegateManagedObjectImpl
All Implemented Interfaces:
Serializable, ManagedCommon, ManagedObject

public class DelegateManagedObjectImpl
extends Object
implements ManagedObject

A delegating

Version:
$Revision: 81571 $
Author:
Scott.Stark@jboss.org
See Also:
Serialized Form

Constructor Summary
DelegateManagedObjectImpl(ManagedObject delegate)
           
 
Method Summary
 Map<String,Annotation> getAnnotations()
          Get the annotations associated with the managed object
 Object getAttachment()
          Get the underlying object.
 String getAttachmentName()
          Get the attachment name
 Object getComponentName()
          Get the runtime component name.
 String getName()
          Get the external name by which the ManagedObject is known
 String getNameType()
          Get the external name type/qualifier.
 Set<ManagedOperation> getOperations()
          Get the operations
 ManagedObject getParent()
          Get the parent ManagedObject
 Map<String,ManagedProperty> getProperties()
          Get the properties
 ManagedProperty getProperty(String name)
          Get a property
 Set<String> getPropertyNames()
          Get the property names
<T> T
getTransientAttachment(Class<T> expectedType)
          Get an attachment from the property, uses the expected type as both the name and to cast the resulting object.
 Object getTransientAttachment(String name)
          Get a transient attachment from the property.
 void setTransientAttachment(String name, Object attachment)
          Set a transient attachment against the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegateManagedObjectImpl

public DelegateManagedObjectImpl(ManagedObject delegate)
Method Detail

getAnnotations

public Map<String,Annotation> getAnnotations()
Description copied from interface: ManagedObject
Get the annotations associated with the managed object

Specified by:
getAnnotations in interface ManagedObject
Returns:
the annotations associated with the managed object

getAttachment

public Object getAttachment()
Description copied from interface: ManagedObject
Get the underlying object. Note that this is only useful in the server environment where the ManagedObject is associated with a deployment attachment. In a client environment (admin tool for example), this is most likely null.

Specified by:
getAttachment in interface ManagedObject
Returns:
the underlying object

getAttachmentName

public String getAttachmentName()
Description copied from interface: ManagedCommon
Get the attachment name

Specified by:
getAttachmentName in interface ManagedCommon
Returns:
the name
See Also:
ManagementObject#attachmentName}}

getName

public String getName()
Description copied from interface: ManagedCommon
Get the external name by which the ManagedObject is known

Specified by:
getName in interface ManagedCommon
Returns:
the name
See Also:
ManagementObject#name}}, ManagementObjectID#name}}

getNameType

public String getNameType()
Description copied from interface: ManagedCommon
Get the external name type/qualifier.

Specified by:
getNameType in interface ManagedCommon
Returns:
the name type
See Also:
ManagementObject#type}, ManagementObjectID#type}

getOperations

public Set<ManagedOperation> getOperations()
Description copied from interface: ManagedCommon
Get the operations

Specified by:
getOperations in interface ManagedCommon
Returns:
the operations

getProperties

public Map<String,ManagedProperty> getProperties()
Description copied from interface: ManagedCommon
Get the properties

Specified by:
getProperties in interface ManagedCommon
Returns:
the properties

getProperty

public ManagedProperty getProperty(String name)
Description copied from interface: ManagedCommon
Get a property

Specified by:
getProperty in interface ManagedCommon
Parameters:
name - the name
Returns:
the property

getPropertyNames

public Set<String> getPropertyNames()
Description copied from interface: ManagedCommon
Get the property names

Specified by:
getPropertyNames in interface ManagedCommon
Returns:
the property names

getComponentName

public Object getComponentName()
Description copied from interface: ManagedCommon
Get the runtime component name.

Specified by:
getComponentName in interface ManagedCommon
Returns:
name of runtime component if one exists, null if no component exists.
See Also:
ManagementRuntimeRef}

getParent

public ManagedObject getParent()
Description copied from interface: ManagedObject
Get the parent ManagedObject

Specified by:
getParent in interface ManagedCommon
Specified by:
getParent in interface ManagedObject
Returns:
the parent if one exists, null otherwise

getTransientAttachment

public <T> T getTransientAttachment(Class<T> expectedType)
Description copied from interface: ManagedObject
Get an attachment from the property, uses the expected type as both the name and to cast the resulting object.

Specified by:
getTransientAttachment in interface ManagedObject
Type Parameters:
T - the expected type
Parameters:
expectedType - the expected type
Returns:
the attachment

getTransientAttachment

public Object getTransientAttachment(String name)
Description copied from interface: ManagedObject
Get a transient attachment from the property.

Specified by:
getTransientAttachment in interface ManagedObject
Parameters:
name - the name
Returns:
the attachment
See Also:
ManagedObject.setTransientAttachment(String, Object)

setTransientAttachment

public void setTransientAttachment(String name,
                                   Object attachment)
Description copied from interface: ManagedObject
Set a transient attachment against the property. A transient attachment is one that will not be available to clients of the property, typically admin tools. Such attachments are used by the server side where the underlying metadata to which the property is associated is available.

Specified by:
setTransientAttachment in interface ManagedObject
Parameters:
name - the name
attachment - the attachment, pass null to remove an attachment


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