org.apache.tuscany.sca.assembly
Interface Contract

All Superinterfaces:
AbstractContract, Base, IntentAttachPoint, PolicySetAttachPoint
All Known Subinterfaces:
ComponentReference, ComponentService, CompositeReference, CompositeService, Reference, RuntimeComponentReference, RuntimeComponentService, Service

public interface Contract
extends AbstractContract, PolicySetAttachPoint

Represents a contract. A contract can be either a service or a reference.

Version:
$Rev: 537391 $ $Date: 2007-05-12 12:42:45 +0100 (Sat, 12 May 2007) $

Method Summary
<B> B
getBinding(java.lang.Class<B> bindingClass)
          Returns a binding of the specified type or null if there is no such binding configured on this contract.
 java.util.List<Binding> getBindings()
          Returns the bindings supported by this contract.
 Callback getCallback()
          Returns a callback definition of the bindings to use for callbacks.
 void setCallback(Callback callback)
          Sets a callback definition of the bindings to use for callbacks
 
Methods inherited from interface org.apache.tuscany.sca.assembly.AbstractContract
getInterfaceContract, getName, setInterfaceContract, setName
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Base
getExtensions, isUnresolved, setUnresolved
 
Methods inherited from interface org.apache.tuscany.sca.policy.IntentAttachPoint
getRequiredIntents
 
Methods inherited from interface org.apache.tuscany.sca.policy.PolicySetAttachPoint
getPolicySets
 
Methods inherited from interface org.apache.tuscany.sca.policy.IntentAttachPoint
getRequiredIntents
 

Method Detail

getBindings

java.util.List<Binding> getBindings()
Returns the bindings supported by this contract.

Returns:
the bindings supported by this contract

getBinding

<B> B getBinding(java.lang.Class<B> bindingClass)
Returns a binding of the specified type or null if there is no such binding configured on this contract.

Type Parameters:
B - the binding type
Parameters:
bindingClass - the binding type class
Returns:
the binding or null if there is no binding of the specified type

getCallback

Callback getCallback()
Returns a callback definition of the bindings to use for callbacks.

Returns:
a definition of the bindings to use for callbacks

setCallback

void setCallback(Callback callback)
Sets a callback definition of the bindings to use for callbacks

Parameters:
callback - a definition of the bindings to use for callbacks