org.apache.tuscany.sca.assembly
Interface AbstractContract

All Superinterfaces:
Base, Extensible, IntentAttachPoint, OperationsConfigurator
All Known Subinterfaces:
AbstractReference, AbstractService, ComponentReference, ComponentService, CompositeReference, CompositeService, Contract, Reference, RuntimeComponentReference, RuntimeComponentService, Service
All Known Implementing Classes:
AbstractReferenceImpl, AbstractServiceImpl, ComponentReferenceImpl, ComponentServiceImpl, CompositeReferenceImpl, CompositeServiceImpl, ContractImpl, ReferenceImpl, RuntimeComponentReferenceImpl, RuntimeComponentServiceImpl, ServiceImpl

public interface AbstractContract
extends Base, Extensible, IntentAttachPoint, OperationsConfigurator

Interface contracts define one or more business functions. These business functions are provided by services and are used by references.


Method Summary
 InterfaceContract getInterfaceContract()
          Returns the interface contract defining the interface and callback interface for the contract.
 java.lang.String getName()
          Returns the name of the contract.
 boolean isCallback()
          Returns true if this contract is a reference or service created internally to handle a callback interface of another contract, false otherwise.
 void setInterfaceContract(InterfaceContract interfaceContract)
          Sets the interface contract defining the interface and callback interface for the contract.
 void setIsCallback(boolean isCallback)
          Sets a flag indicating whether this is a callback contract.
 void setName(java.lang.String name)
          Sets the name of the contract.
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Base
isUnresolved, setUnresolved
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Extensible
getExtensions
 
Methods inherited from interface org.apache.tuscany.sca.policy.IntentAttachPoint
getRequiredIntents, getType, setType
 
Methods inherited from interface org.apache.tuscany.sca.assembly.OperationsConfigurator
getConfiguredOperations
 

Method Detail

getName

java.lang.String getName()
Returns the name of the contract.

Returns:
the name of the contract

setName

void setName(java.lang.String name)
Sets the name of the contract.

Parameters:
name - the name of the contract

getInterfaceContract

InterfaceContract getInterfaceContract()
Returns the interface contract defining the interface and callback interface for the contract.

Returns:
the interface contract

setInterfaceContract

void setInterfaceContract(InterfaceContract interfaceContract)
Sets the interface contract defining the interface and callback interface for the contract.

Parameters:
interfaceContract - the interface contract

isCallback

boolean isCallback()
Returns true if this contract is a reference or service created internally to handle a callback interface of another contract, false otherwise.

Returns:
true for a callback contract, false otherwise

setIsCallback

void setIsCallback(boolean isCallback)
Sets a flag indicating whether this is a callback contract.

Parameters:
isCallback - true for a callback contract, false otherwise