Package org.jboss.as.ee.component
Interface Component
- All Known Implementing Classes:
BasicComponent
public interface Component
Common 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
Modifier and TypeMethodDescriptionCreate a new instance of this component.createInstance(Object instance) Class<?>Get the component's actual implementation class.getInstance(Object instance) Returns a component instance for a pre-existing instance.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.void
-
Method Details
-
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
-
getInstance
Returns a component instance for a pre-existing instance.- Parameters:
instance- the actual object instance- Returns:
- a component instance
-
getNamespaceContextSelector
NamespaceContextSelector getNamespaceContextSelector() -
isRemotable
Checks whether the suppliedThrowableis remotable meaning it can be safely sent to the client over the wire. -
waitForComponentStart
void waitForComponentStart()
-