Package org.jboss.as.ee.component
Interface ComponentInstance
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
BasicComponentInstance
public interface ComponentInstance extends Serializable
An instance of a Jakarta EE component.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<Method>
allowedMethods()
Get the list of allowed methods for this component instance.void
destroy()
Destroy this component instance.Component
getComponent()
Get the component associated with this instance.Object
getInstance()
Get the actual object instance.Object
getInstanceData(Object key)
Gets some data that was attached to this component instanceorg.jboss.invocation.Interceptor
getInterceptor(Method method)
Get the instance interceptor (entry point) for the given method.void
setInstanceData(Object key, Object value)
Attaches some data to this component instance.
-
-
-
Method Detail
-
getComponent
Component getComponent()
Get the component associated with this instance.- Returns:
- the component
-
getInstance
Object getInstance()
Get the actual object instance. The object instance has all injections filled.- Returns:
- the instance
-
getInterceptor
org.jboss.invocation.Interceptor getInterceptor(Method method) throws IllegalStateException
Get the instance interceptor (entry point) for the given method. This is the internal entry point for the component instance, which bypasses view interceptors.- Parameters:
method
- the method- Returns:
- the interceptor
- Throws:
IllegalStateException
- if the method does not exist
-
allowedMethods
Collection<Method> allowedMethods()
Get the list of allowed methods for this component instance. The handler will only accept invocations on these exactMethod
objects.- Returns:
- the list of methods
-
destroy
void destroy()
Destroy this component instance. Implementations of this method must be idempotent, meaning that destroying a component instance more than one time has no additional effect.
-
getInstanceData
Object getInstanceData(Object key)
Gets some data that was attached to this component instance- Parameters:
key
- The component data key- Returns:
- The attached data
-
-