public class BasicComponentInstance extends Object implements ComponentInstance
Modifier and Type | Field and Description |
---|---|
static Object |
INSTANCE_KEY |
Modifier | Constructor and Description |
---|---|
protected |
BasicComponentInstance(BasicComponent component,
org.jboss.invocation.Interceptor preDestroyInterceptor,
Map<Method,org.jboss.invocation.Interceptor> methodInterceptors)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
Collection<Method> |
allowedMethods()
Get the list of allowed methods for this component instance.
|
void |
constructionFinished() |
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 instance
|
org.jboss.invocation.Interceptor |
getInterceptor(Method method)
Get the instance interceptor (entry point) for the given method.
|
protected void |
preDestroy()
Method that sub classes can use to override destroy logic.
|
protected org.jboss.invocation.InterceptorContext |
prepareInterceptorContext() |
void |
setInstanceData(Object key,
Object value)
Attaches some data to this component instance.
|
public static final Object INSTANCE_KEY
protected BasicComponentInstance(BasicComponent component, org.jboss.invocation.Interceptor preDestroyInterceptor, Map<Method,org.jboss.invocation.Interceptor> methodInterceptors)
component
- the componentpublic Component getComponent()
getComponent
in interface ComponentInstance
public Object getInstance()
getInstance
in interface ComponentInstance
public org.jboss.invocation.Interceptor getInterceptor(Method method) throws IllegalStateException
getInterceptor
in interface ComponentInstance
method
- the methodIllegalStateException
- if the method does not existpublic Collection<Method> allowedMethods()
Method
objects.allowedMethods
in interface ComponentInstance
public final void destroy()
destroy
in interface ComponentInstance
public Object getInstanceData(Object key)
ComponentInstance
getInstanceData
in interface ComponentInstance
key
- The component data keypublic void setInstanceData(Object key, Object value)
ComponentInstance
setInstanceData
in interface ComponentInstance
key
- The key to store the datavalue
- The data valuepublic void constructionFinished()
protected void preDestroy()
protected org.jboss.invocation.InterceptorContext prepareInterceptorContext()
Copyright © 2017 JBoss by Red Hat. All rights reserved.