org.osoa.sca
Interface ComponentContext


public interface ComponentContext


Method Summary
<B,R extends CallableReference<B>>
R
cast(B target)
          Casts a type-safe reference to a CallableReference.
<B> ServiceReference<B>
createSelfReference(java.lang.Class<B> businessInterface)
          Returns a ServiceReference that can be used to invoke this component over the designated service.
<B> ServiceReference<B>
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.
<B> B
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.
<B> B
getService(java.lang.Class<B> businessInterface, java.lang.String referenceName)
          Returns a proxy for the reference defined by the current component.
<B> ServiceReference<B>
getServiceReference(java.lang.Class<B> businessInterface, java.lang.String referenceName)
          Returns a ServiceReference defined by the current component.
 java.lang.String getURI()
          Returns the absolute URI of the component within the SCA domain.
 

Method Detail

getURI

java.lang.String getURI()
Returns the absolute URI of the component within the SCA domain.

Returns:
the absolute URI of the component within the SCA domain.

getService

<B> B getService(java.lang.Class<B> businessInterface,
                 java.lang.String referenceName)
Returns a proxy for the reference defined by the current component.

Type Parameters:
B -
Parameters:
businessInterface -
referenceName -
Returns:
a proxy for the reference defined by the current component.

getServiceReference

<B> ServiceReference<B> getServiceReference(java.lang.Class<B> businessInterface,
                                            java.lang.String referenceName)
Returns a ServiceReference defined by the current component.

Type Parameters:
B -
Parameters:
businessInterface -
referenceName -
Returns:
a ServiceReference defined by the current component.

createSelfReference

<B> ServiceReference<B> createSelfReference(java.lang.Class<B> businessInterface)
Returns a ServiceReference that can be used to invoke this component over the designated service.

Type Parameters:
B -
Parameters:
businessInterface -
Returns:
a ServiceReference that can be used to invoke this component over the designated service.

createSelfReference

<B> ServiceReference<B> 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. Service name explicitly declares the service name to invoke.

Type Parameters:
B -
Parameters:
businessInterface -
serviceName -
Returns:
a ServiceReference that can be used to invoke this component over the designated service. Service name explicitly declares the service name to invoke.

getProperty

<B> B getProperty(java.lang.Class<B> type,
                  java.lang.String propertyName)
Returns the value of an SCA property defined by this component.

Type Parameters:
B -
Parameters:
type -
propertyName -
Returns:
the value of an SCA property defined by this component.

cast

<B,R extends CallableReference<B>> R cast(B target)
                                    throws java.lang.IllegalArgumentException
Casts a type-safe reference to a CallableReference.

Type Parameters:
B -
R -
Parameters:
target -
Returns:
Throws:
java.lang.IllegalArgumentException

getRequestContext

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.

Returns:
the context for the current SCA service request, or null if there is no current request or if the context is unavailable.


Copyright © 2009. All Rights Reserved.