org.jboss.managed.plugins
Class ManagedOperationImpl

java.lang.Object
  extended by org.jboss.managed.plugins.ManagedOperationImpl
All Implemented Interfaces:
Serializable, ManagedOperation, TransientAttachments

public class ManagedOperationImpl
extends Object
implements ManagedOperation

A default implementation of ManagedOperation

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.managed.api.ManagedOperation
ManagedOperation.Impact
 
Constructor Summary
ManagedOperationImpl(String name, String description)
           
ManagedOperationImpl(String name, String description, ManagedOperation.Impact impact, ManagedParameter[] parameters, MetaType returnType)
           
 
Method Summary
 String getDescription()
          Get the operation description
 ManagedOperation.Impact getImpact()
          Get the impact of the operation
 String getName()
          Get the name of the operation
 ManagedParameter[] getParameters()
          The parameter information for the operation arguments.
 String[] getReflectionSignature()
          Get the operation signature
 MetaType getReturnType()
          The MetaType for the operation return value.
<T> T
getTransientAttachment(Class<T> expectedType)
          Get an attachment from the parameter, uses the expected type as both the name and to cast the resulting object.
 Object getTransientAttachment(String name)
          Get a transient attachment from the parameter.
 MetaValue invoke(MetaValue... param)
          This does not have a meaningful implementation because the target is unknown.
 void setDescription(String description)
           
 void setImpact(ManagedOperation.Impact impact)
           
 void setName(String name)
           
 void setParameters(ManagedParameter[] parameters)
           
 void setReturnType(MetaType returnType)
           
 void setTransientAttachment(String name, Object attachment)
          Set an transient attachment against the parameter.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManagedOperationImpl

public ManagedOperationImpl(String name,
                            String description)

ManagedOperationImpl

public ManagedOperationImpl(String name,
                            String description,
                            ManagedOperation.Impact impact,
                            ManagedParameter[] parameters,
                            MetaType returnType)
Method Detail

getDescription

public String getDescription()
Description copied from interface: ManagedOperation
Get the operation description

Specified by:
getDescription in interface ManagedOperation
Returns:
the operation description

setDescription

public void setDescription(String description)

getImpact

public ManagedOperation.Impact getImpact()
Description copied from interface: ManagedOperation
Get the impact of the operation

Specified by:
getImpact in interface ManagedOperation
Returns:
the side-effect type invoking the operation has.

setImpact

public void setImpact(ManagedOperation.Impact impact)

getName

public String getName()
Description copied from interface: ManagedOperation
Get the name of the operation

Specified by:
getName in interface ManagedOperation
Returns:
the name of the operation

setName

public void setName(String name)

getParameters

public ManagedParameter[] getParameters()
Description copied from interface: ManagedOperation
The parameter information for the operation arguments. An empty signature array is returned if the operation takes no arguments.

Specified by:
getParameters in interface ManagedOperation
Returns:
parameter information for the operation arguments.

setParameters

public void setParameters(ManagedParameter[] parameters)

getReturnType

public MetaType getReturnType()
Description copied from interface: ManagedOperation
The MetaType for the operation return value.

Specified by:
getReturnType in interface ManagedOperation
Returns:
MetaType for the operation return value.

setReturnType

public void setReturnType(MetaType returnType)

getReflectionSignature

public String[] getReflectionSignature()
Description copied from interface: ManagedOperation
Get the operation signature

Specified by:
getReflectionSignature in interface ManagedOperation
Returns:

invoke

public MetaValue invoke(MetaValue... param)
This does not have a meaningful implementation because the target is unknown. A runtime aspect that understand the context of this operation needs to perform the invocation.

Specified by:
invoke in interface ManagedOperation
Parameters:
param - the varags for the operation parameters.
Returns:
the MetaValue for the result.

toString

public String toString()
Overrides:
toString in class Object

getTransientAttachment

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

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

getTransientAttachment

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

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

setTransientAttachment

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

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


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