Apache Tuscany SCA Kernel Sub-Project

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

java.lang.Object
  extended by org.apache.tuscany.spi.model.Operation<T>

public class Operation<T>
extends Object

Represents an operation that is part of a service contract. The type paramter of this operation identifies the logical type system for all data types.

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

Field Summary
protected  Map<String,Object> metaData
           
 
Constructor Summary
Operation(String name, DataType<List<DataType<T>>> inputType, DataType<T> outputType, List<DataType<T>> faultTypes)
          Construct a minimally-specified operation
Operation(String name, DataType<List<DataType<T>>> inputType, DataType<T> outputType, List<DataType<T>> faultTypes, boolean nonBlocking, String dataBinding)
          Construct an operation
 
Method Summary
 boolean equals(Object o)
           
 String getDataBinding()
          Returns the data binding type specified for the operation or null.
 List<DataType<T>> getFaultTypes()
          Returns the data types of the faults raised by the operation.
 DataType<List<DataType<T>>> getInputType()
          Returns the data types of the parameters passed to the operation.
 Map<String,Object> getMetaData()
          Returns a map of metadata key to value mappings for the operation.
 String getName()
          Returns the name of the operation.
 DataType<T> getOutputType()
          Returns the data type returned by the operation.
 ServiceContract<T> getServiceContract()
          Returns the service contract the operation is part of.
 WrapperInfo getWrapper()
          Return the Wrapper information for this operation is it's wrapper style
 int hashCode()
           
 boolean isCallback()
          Returns true if the operation is part of the callback contract.
 boolean isNonBlocking()
          Returns true if the operation is non-blocking.
 boolean isWrapperStyle()
          Returns true if the operation is wrapper style
 void setCallback(boolean callback)
          Sets whether the operation is part of the callback contract.
 void setDataBinding(String dataBinding)
          Set the databinding for this operation
 void setMetaData(String key, Object val)
          Adds metadata associated with the operation.
 void setNonBlocking(boolean nonBlocking)
          Sets if the operation is non-blocking
 void setServiceContract(ServiceContract<T> contract)
          Sets the service contract the operation is part of.
 void setWrapper(WrapperInfo wrapper)
           
 void setWrapperStyle(boolean wrapperStyle)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

metaData

protected Map<String,Object> metaData
Constructor Detail

Operation

public Operation(String name,
                 DataType<List<DataType<T>>> inputType,
                 DataType<T> outputType,
                 List<DataType<T>> faultTypes)
Construct a minimally-specified operation

Parameters:
name - the name of the operation
inputType - the data types of parameters passed to the operation
outputType - the data type returned by the operation
faultTypes - the data type of faults raised by the operation

Operation

public Operation(String name,
                 DataType<List<DataType<T>>> inputType,
                 DataType<T> outputType,
                 List<DataType<T>> faultTypes,
                 boolean nonBlocking,
                 String dataBinding)
Construct an operation

Parameters:
name - the name of the operation
inputType - the data types of parameters passed to the operation
outputType - the data type returned by the operation
faultTypes - the data type of faults raised by the operation
nonBlocking - if the operation is non-blocking
dataBinding - the data-binding type required by the operation
Method Detail

getServiceContract

public ServiceContract<T> getServiceContract()
Returns the service contract the operation is part of.

Returns:
the service contract the operation is part of.

setServiceContract

public void setServiceContract(ServiceContract<T> contract)
Sets the service contract the operation is part of.

Parameters:
contract - the service contract the operation is part of.

isCallback

public boolean isCallback()
Returns true if the operation is part of the callback contract.

Returns:
true if the operation is part of the callback contract.

setCallback

public void setCallback(boolean callback)
Sets whether the operation is part of the callback contract.

Parameters:
callback - whether the operation is part of the callback contract.

getName

public String getName()
Returns the name of the operation.

Returns:
the name of the operation

getOutputType

public DataType<T> getOutputType()
Returns the data type returned by the operation.

Returns:
the data type returned by the operation

getInputType

public DataType<List<DataType<T>>> getInputType()
Returns the data types of the parameters passed to the operation.

The inputType's logical type is a list of DataTypes which describes the parameter types

Returns:
the data types of the parameters passed to the operation

getFaultTypes

public List<DataType<T>> getFaultTypes()
Returns the data types of the faults raised by the operation.

Returns:
the data types of the faults raised by the operation

isNonBlocking

public boolean isNonBlocking()
Returns true if the operation is non-blocking. A non-blocking operation may not have completed execution at the time an invocation of the operation returns.

Returns:
true if the operation is non-blocking

getDataBinding

public String getDataBinding()
Returns the data binding type specified for the operation or null.

Returns:
the data binding type specified for the operation or null.

setDataBinding

public void setDataBinding(String dataBinding)
Set the databinding for this operation

Parameters:
dataBinding - The 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

setNonBlocking

public void setNonBlocking(boolean nonBlocking)
Sets if the operation is non-blocking


toString

public String toString()
Overrides:
toString in class Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isWrapperStyle

public boolean isWrapperStyle()
Returns true if the operation is wrapper style

Returns:
the wrapperStyle

getWrapper

public WrapperInfo getWrapper()
Return the Wrapper information for this operation is it's wrapper style

Returns:
The Wrapper

setWrapper

public void setWrapper(WrapperInfo wrapper)
Parameters:
wrapper - the wrapper to set

setWrapperStyle

public void setWrapperStyle(boolean wrapperStyle)
Parameters:
wrapperStyle - the wrapperStyle to set

Apache Tuscany SCA Kernel Sub-Project

-