public class BasicComponent extends Object implements Component
Constructor and Description |
---|
BasicComponent(BasicComponentCreateService createService)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
componentInstanceCreated(BasicComponentInstance basicComponentInstance,
org.jboss.invocation.InterceptorFactoryContext context)
Method that can be overridden to perform setup on the instance after it has been created
|
protected BasicComponentInstance |
constructComponentInstance(ManagedReference instance,
boolean invokePostConstruct,
org.jboss.invocation.InterceptorFactoryContext context)
Construct the component instance.
|
ComponentInstance |
createInstance()
Create a new instance of this component.
|
ComponentInstance |
createInstance(Object instance)
Wraps an existing object instance in a ComponentInstance, and run the post construct interceptor chain on it.
|
Class<?> |
getComponentClass()
Get the class of this bean component.
|
String |
getComponentName()
Get the name of this bean component.
|
org.jboss.msc.service.ServiceName |
getCreateServiceName() |
NamespaceContextSelector |
getNamespaceContextSelector() |
protected BasicComponentInstance |
instantiateComponentInstance(AtomicReference<ManagedReference> instanceReference,
org.jboss.invocation.Interceptor preDestroyInterceptor,
Map<Method,org.jboss.invocation.Interceptor> methodInterceptors,
org.jboss.invocation.InterceptorFactoryContext context)
Responsible for instantiating the
BasicComponentInstance . |
void |
start()
Start operation called when the Component is available.
|
void |
stop(org.jboss.msc.service.StopContext stopContext)
Stop operation called when the Component is no longer available.
|
String |
toString() |
protected void |
waitForComponentStart() |
public BasicComponent(BasicComponentCreateService createService)
createService
- the create service which created this componentpublic ComponentInstance createInstance()
createInstance
in interface Component
public ComponentInstance createInstance(Object instance)
instance
- The instance to wrapprotected void waitForComponentStart()
protected BasicComponentInstance constructComponentInstance(ManagedReference instance, boolean invokePostConstruct, org.jboss.invocation.InterceptorFactoryContext context)
instance
- An instance to be wrapped, or null if a new instance should be createdprotected void componentInstanceCreated(BasicComponentInstance basicComponentInstance, org.jboss.invocation.InterceptorFactoryContext context)
basicComponentInstance
- The component instancecontext
- The interceptor factory context used to construct the instanceprotected BasicComponentInstance instantiateComponentInstance(AtomicReference<ManagedReference> instanceReference, org.jboss.invocation.Interceptor preDestroyInterceptor, Map<Method,org.jboss.invocation.Interceptor> methodInterceptors, org.jboss.invocation.InterceptorFactoryContext context)
BasicComponentInstance
. This method is *not* responsible for
handling the post construct activities like injection and lifecycle invocation. That is handled by
constructComponentInstance(ManagedReference, boolean, InterceptorFactoryContext)
.
public Class<?> getComponentClass()
getComponentClass
in interface Component
public String getComponentName()
public org.jboss.msc.service.ServiceName getCreateServiceName()
public void start()
public void stop(org.jboss.msc.service.StopContext stopContext)
public NamespaceContextSelector getNamespaceContextSelector()
getNamespaceContextSelector
in interface Component
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.