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)
Method that can be overridden to perform setup on the instance after it has been created
|
protected BasicComponentInstance |
constructComponentInstance(ManagedReference instance,
boolean invokePostConstruct)
Construct the component instance.
|
protected BasicComponentInstance |
constructComponentInstance(ManagedReference instance,
boolean invokePostConstruct,
Map<Object,Object> 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.
|
protected void |
createInterceptors(org.jboss.invocation.InterceptorFactoryContext context) |
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(org.jboss.invocation.Interceptor preDestroyInterceptor,
Map<Method,org.jboss.invocation.Interceptor> methodInterceptors,
Map<Object,Object> context)
Responsible for instantiating the
BasicComponentInstance . |
static org.jboss.msc.service.ServiceName |
serviceNameOf(org.jboss.msc.service.ServiceName deploymentUnitServiceName,
String componentName) |
void |
start()
Start operation called when the Component is available.
|
void |
stop()
Stop operation called when the Component is no longer available.
|
String |
toString() |
protected void |
waitForComponentStart() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isRemotable
public BasicComponent(BasicComponentCreateService createService)
createService
- the create service which created this componentpublic ComponentInstance createInstance()
createInstance
in interface Component
public ComponentInstance createInstance(Object instance)
createInstance
in interface Component
instance
- The instance to wrapprotected void waitForComponentStart()
protected BasicComponentInstance constructComponentInstance(ManagedReference instance, boolean invokePostConstruct)
instance
- An instance to be wrapped, or null if a new instance should be createdprotected BasicComponentInstance constructComponentInstance(ManagedReference instance, boolean invokePostConstruct, Map<Object,Object> context)
instance
- An instance to be wrapped, or null if a new instance should be createdprotected void componentInstanceCreated(BasicComponentInstance basicComponentInstance)
basicComponentInstance
- The component instanceprotected BasicComponentInstance instantiateComponentInstance(org.jboss.invocation.Interceptor preDestroyInterceptor, Map<Method,org.jboss.invocation.Interceptor> methodInterceptors, Map<Object,Object> context)
BasicComponentInstance
. This method is *not* responsible for
handling the post construct activities like injection and lifecycle invocation. That is handled by
constructComponentInstance(org.jboss.as.naming.ManagedReference, boolean)
.
public Class<?> getComponentClass()
getComponentClass
in interface Component
public String getComponentName()
public org.jboss.msc.service.ServiceName getCreateServiceName()
public void start()
protected void createInterceptors(org.jboss.invocation.InterceptorFactoryContext context)
public void stop()
public NamespaceContextSelector getNamespaceContextSelector()
getNamespaceContextSelector
in interface Component
public static org.jboss.msc.service.ServiceName serviceNameOf(org.jboss.msc.service.ServiceName deploymentUnitServiceName, String componentName)
Copyright © 2017 JBoss by Red Hat. All rights reserved.