org.apache.tuscany.sca.extension.helper.impl
Class ImplementationImplementationProvider

java.lang.Object
  extended by org.apache.tuscany.sca.extension.helper.impl.ImplementationImplementationProvider
All Implemented Interfaces:
ImplementationProvider

public class ImplementationImplementationProvider
extends java.lang.Object
implements ImplementationProvider

The ImplementationProvider createInvoker method is called before the start method but the runtime isn't properly setup until the start method is called. This means that Invoker's can't initialize things like the services, references and properties until start is called. This class tries to get around that by using an Invoker proxy that delays creating the real Invoker till start is called.


Constructor Summary
ImplementationImplementationProvider(ImplementationActivator implementationActivator, RuntimeComponent rc, Implementation impl, java.lang.Object userImpl)
           
 
Method Summary
 Invoker createInvoker(RuntimeComponentService arg0, Operation op)
          Create an invoker for the component implementation in the invocation chain.
 void start()
          This method will be invoked when the component implementation is activated.
 void stop()
          This method will be invoked when the component implementation is deactivated.
 boolean supportsOneWayInvocation()
          For bindings that invoke one-way callback operations asynchronously, there is no need to perform a thread switch before calling the invoker.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImplementationImplementationProvider

public ImplementationImplementationProvider(ImplementationActivator implementationActivator,
                                            RuntimeComponent rc,
                                            Implementation impl,
                                            java.lang.Object userImpl)
Method Detail

createInvoker

public Invoker createInvoker(RuntimeComponentService arg0,
                             Operation op)
Description copied from interface: ImplementationProvider
Create an invoker for the component implementation in the invocation chain. The invoker will be responsible for calling the implementation logic for the given component.

Specified by:
createInvoker in interface ImplementationProvider
Parameters:
arg0 - The component service
op - The operation that the interceptor will handle
Returns:
An invoker that handles the invocation logic, null should be returned if no invoker is required

supportsOneWayInvocation

public boolean supportsOneWayInvocation()
Description copied from interface: ImplementationProvider
For bindings that invoke one-way callback operations asynchronously, there is no need to perform a thread switch before calling the invoker. This method indicates whether the binding has this capability.

Specified by:
supportsOneWayInvocation in interface ImplementationProvider
Returns:
true if the callback invoker is able to invoke one-way operations asynchronously, false if all invocations are synchronous

start

public void start()
Description copied from interface: ImplementationProvider
This method will be invoked when the component implementation is activated.

Specified by:
start in interface ImplementationProvider

stop

public void stop()
Description copied from interface: ImplementationProvider
This method will be invoked when the component implementation is deactivated.

Specified by:
stop in interface ImplementationProvider