org.apache.tuscany.sca.interfacedef
Interface InterfaceContract

All Superinterfaces:
java.lang.Cloneable
All Known Subinterfaces:
JavaInterfaceContract, WSDLInterfaceContract
All Known Implementing Classes:
InterfaceContractImpl, JavaInterfaceContractImpl, WSDLInterfaceContractImpl

public interface InterfaceContract
extends java.lang.Cloneable

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


Method Summary
 java.lang.Object clone()
          Implementations must support cloning.
 Interface getCallbackInterface()
          Returns the interface definition representing the interface for invocations from the provider to the requestor.
 Interface getInterface()
          Returns the interface definition representing the interface for invocations from the requestor to the provider.
 InterfaceContract makeUnidirectional(boolean isCallback)
          Convert an interface contract to a unidirectional interface contract
 void setCallbackInterface(Interface callbackInterface)
          Sets the interface definition representing the interface for invocations from the provider to the requestor.
 void setInterface(Interface callInterface)
          Sets the interface definition representing the interface for invocations from the requestor to the provider.
 

Method Detail

getInterface

Interface getInterface()
Returns the interface definition representing the interface for invocations from the requestor to the provider.

Returns:
the interface definition representing the interface for invocations from the requestor to the provider

setInterface

void setInterface(Interface callInterface)
Sets the interface definition representing the interface for invocations from the requestor to the provider.

Parameters:
callInterface - the interface definition representing the interface for invocations from the requestor to the provider

getCallbackInterface

Interface getCallbackInterface()
Returns the interface definition representing the interface for invocations from the provider to the requestor.

Returns:
the interface definition representing the interface for invocations from the provider to the requestor.

setCallbackInterface

void setCallbackInterface(Interface callbackInterface)
Sets the interface definition representing the interface for invocations from the provider to the requestor.

Parameters:
callbackInterface - the interface definition representing the interface for invocations from the provider to the requestor.

makeUnidirectional

InterfaceContract makeUnidirectional(boolean isCallback)
Convert an interface contract to a unidirectional interface contract

Parameters:
isCallback - true for a callback interface contract, false for a forward interface contract
Returns:
A unidirectional interface contract, cloned if necessary

clone

java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Implementations must support cloning.

Throws:
java.lang.CloneNotSupportedException