org.apache.tuscany.sca.binding.ejb.provider
Class EJBBindingReferenceBindingProvider

java.lang.Object
  extended by org.apache.tuscany.sca.binding.ejb.provider.EJBBindingReferenceBindingProvider
All Implemented Interfaces:
ReferenceBindingProvider

public class EJBBindingReferenceBindingProvider
extends java.lang.Object
implements ReferenceBindingProvider

Implementation of the ReferenceBindingProvider for the EJBBinding.


Constructor Summary
EJBBindingReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, EJBBinding binding)
          Constructor
 
Method Summary
 Invoker createInvoker(Operation operation)
          Create an invoker for the reference binding in the invocation chain.
 InterfaceContract getBindingInterfaceContract()
          Get the effective interface contract imposed by the binding.
 void start()
          This method will be invoked when the component reference binding is activated.
 void stop()
          This method will be invoked when the component reference binding is deactivated.
 boolean supportsOneWayInvocation()
          For bindings that invoke one-way 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

EJBBindingReferenceBindingProvider

public EJBBindingReferenceBindingProvider(RuntimeComponent component,
                                          RuntimeComponentReference reference,
                                          EJBBinding binding)
Constructor

Parameters:
component -
reference -
binding -
Method Detail

createInvoker

public Invoker createInvoker(Operation operation)
Create an invoker for the reference binding in the invocation chain. The invoker is responsible for making the outbound invocation over the binding protocol.

Specified by:
createInvoker in interface ReferenceBindingProvider
Parameters:
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

getBindingInterfaceContract

public InterfaceContract getBindingInterfaceContract()
Get the effective interface contract imposed by the binding. For example, it will be interface contract introspected from the WSDL portType used by the endpoint for a WebService binding.

Specified by:
getBindingInterfaceContract in interface ReferenceBindingProvider
Returns:
The effective interface contract, if null is returned, the interface contract for the component reference will be used

start

public void start()
This method will be invoked when the component reference binding is activated.

Specified by:
start in interface ReferenceBindingProvider

stop

public void stop()
This method will be invoked when the component reference binding is deactivated.

Specified by:
stop in interface ReferenceBindingProvider

supportsOneWayInvocation

public boolean supportsOneWayInvocation()
For bindings that invoke one-way 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 ReferenceBindingProvider
Returns:
true if the binding invoker is able to invoke one-way operations asynchronously, false if all invocations are synchronous