Package org.jboss.as.ee.component
Interface ComponentInstance
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
BasicComponentInstance
An instance of a Jakarta EE component.
- Author:
- David M. Lloyd
-
Method Summary
Modifier and TypeMethodDescriptionGet the list of allowed methods for this component instance.voiddestroy()Destroy this component instance.Get the component associated with this instance.Get the actual object instance.getInstanceData(Object key) Gets some data that was attached to this component instanceorg.jboss.invocation.InterceptorgetInterceptor(Method method) Get the instance interceptor (entry point) for the given method.voidsetInstanceData(Object key, Object value) Attaches some data to this component instance.
-
Method Details
-
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
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 exactMethodobjects.- 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
Gets some data that was attached to this component instance- Parameters:
key- The component data key- Returns:
- The attached data
-
setInstanceData
Attaches some data to this component instance. This should only be used during component construction.- Parameters:
key- The key to store the datavalue- The data value
-