org.apache.tuscany.sca.runtime
Interface RuntimeComponentContext

All Superinterfaces:
org.osoa.sca.ComponentContext, ComponentContextExtension
All Known Implementing Classes:
ComponentContextImpl

public interface RuntimeComponentContext
extends ComponentContextExtension


Method Summary
<B> org.osoa.sca.ServiceReference<B>
createSelfReference(java.lang.Class<B> businessInterface, ComponentService service)
           
<B> org.osoa.sca.CallableReference<B>
getCallableReference(java.lang.Class<B> businessInterface, RuntimeComponent component, RuntimeComponentService service)
          Create a CallableReference for the given component service
<B> org.osoa.sca.ServiceReference<B>
getServiceReference(java.lang.Class<B> businessInterface, RuntimeComponentReference reference, Binding binding)
          Get the CallableReference for a given component reference
<B> org.osoa.sca.ServiceReference<B>
getServiceReference(java.lang.Class<B> businessInterface, RuntimeComponentReference reference, RuntimeComponent component, RuntimeComponentService service)
          Bind the reference to a target component/componentService
 RuntimeComponent read(java.io.Reader reader)
          Deserialize the component reference
 void start(RuntimeComponentReference reference)
          Activate the reference (creating runtime wires)
 void write(RuntimeComponentReference reference, java.io.Writer writer)
          Serialize the component reference
 
Methods inherited from interface org.apache.tuscany.sca.api.ComponentContextExtension
getServiceReferences, getServices
 
Methods inherited from interface org.osoa.sca.ComponentContext
cast, createSelfReference, createSelfReference, getProperty, getRequestContext, getService, getServiceReference, getURI
 

Method Detail

start

void start(RuntimeComponentReference reference)
Activate the reference (creating runtime wires)

Parameters:
reference -

read

RuntimeComponent read(java.io.Reader reader)
                      throws java.io.IOException
Deserialize the component reference

Parameters:
reader -
Returns:
A component that contains the reference
Throws:
java.io.IOException

write

void write(RuntimeComponentReference reference,
           java.io.Writer writer)
           throws java.io.IOException
Serialize the component reference

Parameters:
reference -
writer -
Throws:
java.io.IOException

getServiceReference

<B> org.osoa.sca.ServiceReference<B> getServiceReference(java.lang.Class<B> businessInterface,
                                                         RuntimeComponentReference reference,
                                                         Binding binding)
Get the CallableReference for a given component reference

Type Parameters:
B -
Parameters:
businessInterface - The business interface
reference - The reference to be wired
binding - The binding to be used, if it's null, either binding.sca or the 1st binding will be selected
Returns:
A service reference representing the wire

getServiceReference

<B> org.osoa.sca.ServiceReference<B> getServiceReference(java.lang.Class<B> businessInterface,
                                                         RuntimeComponentReference reference,
                                                         RuntimeComponent component,
                                                         RuntimeComponentService service)
Bind the reference to a target component/componentService

Type Parameters:
B -
Parameters:
businessInterface - The business interface
reference - The reference to be wired
component - The target component
service - The target component service
Returns:
A service reference representing the wire

getCallableReference

<B> org.osoa.sca.CallableReference<B> getCallableReference(java.lang.Class<B> businessInterface,
                                                           RuntimeComponent component,
                                                           RuntimeComponentService service)
Create a CallableReference for the given component service

Type Parameters:
B -
Parameters:
businessInterface -
component -
service -
Returns:

createSelfReference

<B> org.osoa.sca.ServiceReference<B> createSelfReference(java.lang.Class<B> businessInterface,
                                                         ComponentService service)
Type Parameters:
B -
Parameters:
businessInterface -
service -
Returns: