org.apache.tuscany.sca.implementation.java.invocation
Class JavaImplementationProvider

java.lang.Object
  extended by org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationProvider
All Implemented Interfaces:
ScopedImplementationProvider, ImplementationProvider

public class JavaImplementationProvider
extends java.lang.Object
implements ScopedImplementationProvider


Constructor Summary
JavaImplementationProvider(RuntimeComponent component, JavaImplementation implementation, ProxyFactory proxyService, DataBindingExtensionPoint dataBindingRegistry, JavaPropertyValueObjectFactory propertyValueObjectFactory, ComponentContextFactory componentContextFactory, RequestContextFactory requestContextFactory, java.util.List<PolicyHandlerTuple> policyHandlerClassNames)
           
 
Method Summary
 InstanceWrapper createInstanceWrapper()
          Create a wrapper for the component instance for the scope management
 Invoker createInvoker(RuntimeComponentService service, Operation operation)
          Create an invoker for the component implementation in the invocation chain.
 long getMaxAge()
           
 long getMaxIdleTime()
           
 Scope getScope()
          Get the scope for the component implementation
 boolean isEagerInit()
          Indicate if the component needs to be eagerly initialized
 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

JavaImplementationProvider

public JavaImplementationProvider(RuntimeComponent component,
                                  JavaImplementation implementation,
                                  ProxyFactory proxyService,
                                  DataBindingExtensionPoint dataBindingRegistry,
                                  JavaPropertyValueObjectFactory propertyValueObjectFactory,
                                  ComponentContextFactory componentContextFactory,
                                  RequestContextFactory requestContextFactory,
                                  java.util.List<PolicyHandlerTuple> policyHandlerClassNames)
Method Detail

createInvoker

public Invoker createInvoker(RuntimeComponentService service,
                             Operation operation)
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:
service - The component service
operation - 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

getScope

public Scope getScope()
Description copied from interface: ScopedImplementationProvider
Get the scope for the component implementation

Specified by:
getScope in interface ScopedImplementationProvider
Returns:
The scope for the component implementation, if null is returned, STATELESS will be used

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

createInstanceWrapper

public InstanceWrapper createInstanceWrapper()
Description copied from interface: ScopedImplementationProvider
Create a wrapper for the component instance for the scope management

Specified by:
createInstanceWrapper in interface ScopedImplementationProvider
Returns:
A wrapper for the component instance

isEagerInit

public boolean isEagerInit()
Description copied from interface: ScopedImplementationProvider
Indicate if the component needs to be eagerly initialized

Specified by:
isEagerInit in interface ScopedImplementationProvider
Returns:
true if the component is marked to be eagerly initialized, false otherwise

getMaxAge

public long getMaxAge()
Specified by:
getMaxAge in interface ScopedImplementationProvider
Returns:
the maxAge

getMaxIdleTime

public long getMaxIdleTime()
Specified by:
getMaxIdleTime in interface ScopedImplementationProvider
Returns:
the maxIdleTime