Apache Tuscany SCA Kernel Sub-Project

org.apache.tuscany.spi.model
Class ServiceContract<T>

java.lang.Object
  extended by org.apache.tuscany.spi.model.ModelObject
      extended by org.apache.tuscany.spi.model.ServiceContract<T>
Direct Known Subclasses:
JavaServiceContract

public abstract class ServiceContract<T>
extends ModelObject

Base class representing service contract information

Version:
$Rev: 453857 $ $Date: 2006-10-07 01:18:27 -0700 (Sat, 07 Oct 2006) $

Field Summary
protected  Class<?> callbackClass
           
protected  String callbackName
           
protected  Map<String,Operation<T>> callbackOperations
           
protected  String dataBinding
           
protected  InteractionScope interactionScope
           
protected  Class<?> interfaceClass
           
protected  String interfaceName
           
protected  Map<String,Object> metaData
           
protected  Map<String,Operation<T>> operations
           
protected  boolean remotable
           
 
Constructor Summary
protected ServiceContract()
           
protected ServiceContract(Class<?> interfaceClass)
           
protected ServiceContract(String interfaceName)
           
 
Method Summary
 boolean equals(Object o)
           
 Class<?> getCallbackClass()
          Returns the name of the callback service
 String getCallbackName()
          Returns the name of the callback or null if the contract is unidirectional
 Map<String,Operation<T>> getCallbackOperations()
           
 String getDataBinding()
           
 InteractionScope getInteractionScope()
          Returns the service interaction scope
 Class<?> getInterfaceClass()
          Returns the class used to represent the service contract
 String getInterfaceName()
          Returns the interface name for the contract
 Map<String,Object> getMetaData()
          Returns a map of metadata key to value mappings for the operation.
 Map<String,Operation<T>> getOperations()
           
 int hashCode()
           
 boolean isRemotable()
           
 void setCallbackClass(Class<?> callbackClass)
           
 void setCallbackName(String callbackName)
          Sets the name of the callback service
 void setCallbackOperations(Map<String,Operation<T>> callbacksOperations)
           
 void setDataBinding(String dataBinding)
           
 void setInteractionScope(InteractionScope interactionScope)
          Sets the service interaction scope
 void setInterfaceClass(Class<?> interfaceClass)
          Sets the class used to represent the service contract
 void setInterfaceName(String interfaceName)
          Sets the interface name for the contract
 void setMetaData(String key, Object val)
          Adds metadata associated with the operation.
 void setOperations(Map<String,Operation<T>> operations)
           
 void setRemotable(boolean remotable)
           
 String toString()
           
 
Methods inherited from class org.apache.tuscany.spi.model.ModelObject
getExtensions
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

interactionScope

protected InteractionScope interactionScope

remotable

protected boolean remotable

interfaceClass

protected Class<?> interfaceClass

interfaceName

protected String interfaceName

callbackName

protected String callbackName

callbackClass

protected Class<?> callbackClass

operations

protected Map<String,Operation<T>> operations

callbackOperations

protected Map<String,Operation<T>> callbackOperations

dataBinding

protected String dataBinding

metaData

protected Map<String,Object> metaData
Constructor Detail

ServiceContract

protected ServiceContract()

ServiceContract

protected ServiceContract(Class<?> interfaceClass)

ServiceContract

protected ServiceContract(String interfaceName)
Method Detail

getInterfaceName

public String getInterfaceName()
Returns the interface name for the contract

Returns:
the interface name for the contract

setInterfaceName

public void setInterfaceName(String interfaceName)
Sets the interface name for the contract


getInterfaceClass

public Class<?> getInterfaceClass()
Returns the class used to represent the service contract


setInterfaceClass

public void setInterfaceClass(Class<?> interfaceClass)
Sets the class used to represent the service contract


getInteractionScope

public InteractionScope getInteractionScope()
Returns the service interaction scope


setInteractionScope

public void setInteractionScope(InteractionScope interactionScope)
Sets the service interaction scope


isRemotable

public boolean isRemotable()
Returns:
the remotable

setRemotable

public void setRemotable(boolean remotable)
Parameters:
remotable - the remotable to set

getCallbackName

public String getCallbackName()
Returns the name of the callback or null if the contract is unidirectional


setCallbackName

public void setCallbackName(String callbackName)
Sets the name of the callback service


getCallbackClass

public Class<?> getCallbackClass()
Returns the name of the callback service


setCallbackClass

public void setCallbackClass(Class<?> callbackClass)

getOperations

public Map<String,Operation<T>> getOperations()

setOperations

public void setOperations(Map<String,Operation<T>> operations)

getCallbackOperations

public Map<String,Operation<T>> getCallbackOperations()

setCallbackOperations

public void setCallbackOperations(Map<String,Operation<T>> callbacksOperations)

getDataBinding

public String getDataBinding()

setDataBinding

public void setDataBinding(String dataBinding)

getMetaData

public Map<String,Object> getMetaData()
Returns a map of metadata key to value mappings for the operation.

Returns:
a map of metadata key to value mappings for the operation.

setMetaData

public void setMetaData(String key,
                        Object val)
Adds metadata associated with the operation.

Parameters:
key - the metadata key
val - the metadata value

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

Apache Tuscany SCA Kernel Sub-Project

-