Package org.jboss.as.ee.component
Interface Component
-
- All Known Implementing Classes:
BasicComponent
public interface ComponentCommon contract for an EE component. Implementations of this will be available as a service and can be used as the backing for a JNDI ObjectFactory reference.- Author:
- John Bailey, Carlo de Wolf, David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ComponentInstancecreateInstance()Create a new instance of this component.ComponentInstancecreateInstance(Object instance)Class<?>getComponentClass()Get the component's actual implementation class.ComponentInstancegetInstance(Object instance)Returns a component instance for a pre-existing instance.NamespaceContextSelectorgetNamespaceContextSelector()default booleanisRemotable(Throwable throwable)Checks whether the suppliedThrowableis remotable meaning it can be safely sent to the client over the wire.voidstart()Start operation called when the Component is available.voidstop()Stop operation called when the Component is no longer available.voidwaitForComponentStart()
-
-
-
Method Detail
-
start
void start()
Start operation called when the Component is available.
-
stop
void stop()
Stop operation called when the Component is no longer available.
-
getComponentClass
Class<?> getComponentClass()
Get the component's actual implementation class.- Returns:
- the component class
-
createInstance
ComponentInstance createInstance()
Create a new instance of this component. This may be invoked by a component interceptor, a client interceptor, or in the course of creating a new client, or in the case of an "eager" singleton, at component start. This method will block until the component is available. If the component fails to start then a runtime exception will be thrown.- Returns:
- the component instance
-
createInstance
ComponentInstance createInstance(Object instance)
-
getInstance
ComponentInstance getInstance(Object instance)
Returns a component instance for a pre-existing instance.- Parameters:
instance- the actual object instance- Returns:
- a component instance
-
getNamespaceContextSelector
NamespaceContextSelector getNamespaceContextSelector()
-
isRemotable
default boolean isRemotable(Throwable throwable)
Checks whether the suppliedThrowableis remotable meaning it can be safely sent to the client over the wire.
-
waitForComponentStart
void waitForComponentStart()
-
-