|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComponentContext
Interface providing programmatic access to a component's SCA context as an alternative to injection. It provides access to reference and property values for the component and provides a mechanism for obtaining a reference to a service that can be passed to other components.
SCA components obtain an instance of this interface through injection. Non-SCA client code may also obtain an instance through runtime-specific mechanisms.
Method Summary | ||
---|---|---|
|
cast(B target)
Cast a type-safe reference to a CallableReference. |
|
|
createSelfReference(java.lang.Class<B> businessInterface)
Returns a ServiceReference that can be used to invoke this component over the default service. |
|
|
createSelfReference(java.lang.Class<B> businessInterface,
java.lang.String serviceName)
Returns a ServiceReference that can be used to invoke this component over the designated service. |
|
|
getProperty(java.lang.Class<B> type,
java.lang.String propertyName)
Returns the value of an SCA property defined by this component. |
|
RequestContext |
getRequestContext()
Returns the context for the current SCA service request, or null if there is no current request or if the context is unavailable. |
|
|
getService(java.lang.Class<B> businessInterface,
java.lang.String referenceName)
Returns a proxy for a reference defined by this component. |
|
|
getServiceReference(java.lang.Class<B> businessInterface,
java.lang.String referenceName)
Returns a ServiceReference for a reference defined by this component. |
|
java.lang.String |
getURI()
Returns the absolute URI of the component within the SCA Domain. |
Method Detail |
---|
java.lang.String getURI()
<B,R extends CallableReference<B>> R cast(B target) throws java.lang.IllegalArgumentException
B
- the Java type of the business interface for the referenceR
- the type of reference to be returnedtarget
- a reference proxy provided by the SCA runtime
java.lang.IllegalArgumentException
- if the supplied instance is not a reference supplied by the SCA runtime<B> B getService(java.lang.Class<B> businessInterface, java.lang.String referenceName)
B
- the Java type of the business interface for the referencebusinessInterface
- the interface that will be used to invoke the servicereferenceName
- the name of the reference
<B> ServiceReference<B> getServiceReference(java.lang.Class<B> businessInterface, java.lang.String referenceName)
B
- the Java type of the business interface for the referencebusinessInterface
- the interface that will be used to invoke the servicereferenceName
- the name of the reference
<B> B getProperty(java.lang.Class<B> type, java.lang.String propertyName)
B
- the Java type of the propertytype
- the Java type to be returned for the propertypropertyName
- the name of the property whose value should be returned
<B> ServiceReference<B> createSelfReference(java.lang.Class<B> businessInterface)
B
- the Java type of the business interface for the referencebusinessInterface
- the interface that will be used to invoke the service
<B> ServiceReference<B> createSelfReference(java.lang.Class<B> businessInterface, java.lang.String serviceName)
B
- the Java type of the business interface for the referencebusinessInterface
- the interface that will be used to invoke the serviceserviceName
- the name of the service to invoke
RequestContext getRequestContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |