com.adeptia.indigo.system
Interface Context


public interface Context

Context interface defines all the methods that process runtime needs to interact with process flow context.

Version:
CVS $Revision: 1.7 $

Method Summary
 void addToExecutionPath(java.lang.Object obj)
          Adds an object to current transaction execution path
 void clear()
          Removes all mappings from context map
 boolean containsKey(java.lang.Object key)
          Method to check mapping for the specified key in context map
 boolean containsValue(java.lang.Object value)
          Returns true if context map maps one or more keys to the specified value
 void createSignal(java.lang.String signal)
          Method to create signal for asynchronous activity with signal name as param
 java.util.Set entrySet()
          Method to return a set view of the mappings contained in this context map
 java.lang.Object get(java.lang.Object key)
          Returns the value to which context map maps the specified key
 java.lang.Object getActivityParameter(java.lang.String activityName, java.lang.String parameterName)
          Get an activity parameter from the context.
 java.util.ArrayList getExecutionPath()
          Sets execution path for current transaction
 java.util.Map getMap()
          Returns context map
 com.adeptia.indigo.system.ObjectAddress getObjectAddress()
          Method to get object address of current transaction context in format serverName://objectName
 com.adeptia.indigo.system.ObjectAddress getParentContextAddress()
          Gets object address for parent transaction context
 com.adeptia.indigo.system.ObjectAddress getServiceAddress(java.lang.String name)
          Gets object address of service used in the transaction.
 java.util.Map getServiceAddressMap()
          Reurns service address map for current transaction
 boolean isEmpty()
          Returns true if context map contains no key-value mappings.
 java.util.Set keySet()
          Method to return a set view of the keys contained in this map
 java.util.Map obtainSignals()
          Returns a map view for all signals present in current transaction context
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Associates the specified value with the specified key in context map
 void putAll(java.util.Map t)
          Copies all of the mappings from the specified map to context map
 void raiseSignal(java.lang.String signal)
          Method to raise signal for asynchronous activity with signal name as param
 java.lang.Object remove(java.lang.Object key)
          Removes the mapping for this key from context map if it is present
 void setActivityParameter(java.lang.String activityName, java.lang.String parameterName, java.lang.Object parameterValue)
          Set a activity parameter in activity params map
 void setExecutionPath(java.util.ArrayList executionPath)
          Sets execution path for current transaction
 void setObjectAddress(com.adeptia.indigo.system.ObjectAddress address)
          Method to set object address of current transaction context in format serverName://objectName
 void setParentContextAddress(com.adeptia.indigo.system.ObjectAddress objectAddress)
          Sets object address for parent transaction context
 void setServiceAddress(java.lang.String name, com.adeptia.indigo.system.ObjectAddress objAddress)
          Sets object address of service used in transaction.
 void setServiceAddressMap(java.util.Map serviceAddress)
          Sets service address map for current transaction
 int size()
          Returns the number of key-value mappings in context map
 boolean syncCompleted(java.lang.String signal)
          Returns true if given signal has been raised
 java.util.Collection values()
          Returns a collection view of the values contained in context map.
 

Method Detail

getObjectAddress

com.adeptia.indigo.system.ObjectAddress getObjectAddress()
Method to get object address of current transaction context in format serverName://objectName

Returns:
object address in format serverName://objectName

setObjectAddress

void setObjectAddress(com.adeptia.indigo.system.ObjectAddress address)
Method to set object address of current transaction context in format serverName://objectName

Parameters:
address - object address in format serverName://objectName

containsKey

boolean containsKey(java.lang.Object key)
Method to check mapping for the specified key in context map

Parameters:
key - key whose presence in context map is to be tested.
Returns:
true if context map contains a mapping for the specified key.

containsValue

boolean containsValue(java.lang.Object value)
Returns true if context map maps one or more keys to the specified value

Parameters:
value - value whose presence in context map is to be tested.
Returns:
true if context map contains a mapping for the specified key.

entrySet

java.util.Set entrySet()
Method to return a set view of the mappings contained in this context map

Returns:
a set view of the mappings contained in context map.

isEmpty

boolean isEmpty()
Returns true if context map contains no key-value mappings.

Returns:
true if context map contains no key-value mappings

keySet

java.util.Set keySet()
Method to return a set view of the keys contained in this map

Returns:
a set view of the keys contained in context map.

putAll

void putAll(java.util.Map t)
Copies all of the mappings from the specified map to context map

Parameters:
t - Mappings to be stored in context map.

remove

java.lang.Object remove(java.lang.Object key)
Removes the mapping for this key from context map if it is present

Parameters:
key - key whose mapping is to be removed from the map
Returns:
previous value associated with specified key, or null if there was no mapping for key.

size

int size()
Returns the number of key-value mappings in context map

Returns:
the number of key-value mappings in context map.

values

java.util.Collection values()
Returns a collection view of the values contained in context map.

Returns:
a collection view of the values contained in context map.

clear

void clear()
Removes all mappings from context map


get

java.lang.Object get(java.lang.Object key)
Returns the value to which context map maps the specified key

Parameters:
key - key whose associated value is to be returned.
Returns:
the value to which context map maps the specified key, or null if the map contains no mapping for this key

put

java.lang.Object put(java.lang.Object key,
                     java.lang.Object value)
Associates the specified value with the specified key in context map

Parameters:
key - key with which the specified value is to be associated
value - value to be associated with the specified key
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.

setActivityParameter

void setActivityParameter(java.lang.String activityName,
                          java.lang.String parameterName,
                          java.lang.Object parameterValue)
Set a activity parameter in activity params map

Parameters:
activityName -
parameterName -
parameterValue -

getActivityParameter

java.lang.Object getActivityParameter(java.lang.String activityName,
                                      java.lang.String parameterName)
Get an activity parameter from the context.

Parameters:
activityName -
parameterName -
Returns:

createSignal

void createSignal(java.lang.String signal)
Method to create signal for asynchronous activity with signal name as param


raiseSignal

void raiseSignal(java.lang.String signal)
                 throws com.adeptia.indigo.utils.IndigoException
Method to raise signal for asynchronous activity with signal name as param

Throws:
com.adeptia.indigo.utils.IndigoException

syncCompleted

boolean syncCompleted(java.lang.String signal)
                      throws com.adeptia.indigo.utils.IndigoException
Returns true if given signal has been raised

Parameters:
signal - signal to be check
Returns:
true if given signal has been raised
Throws:
com.adeptia.indigo.utils.IndigoException

obtainSignals

java.util.Map obtainSignals()
Returns a map view for all signals present in current transaction context

Returns:
map containing all signals in current transaction context

setParentContextAddress

void setParentContextAddress(com.adeptia.indigo.system.ObjectAddress objectAddress)
Sets object address for parent transaction context

Parameters:
object - address in format serverName://objectName

getParentContextAddress

com.adeptia.indigo.system.ObjectAddress getParentContextAddress()
Gets object address for parent transaction context

Returns:
object address in format serverName://objectName

getMap

java.util.Map getMap()
Returns context map

Returns:
context map

getExecutionPath

java.util.ArrayList getExecutionPath()
Sets execution path for current transaction


addToExecutionPath

void addToExecutionPath(java.lang.Object obj)
Adds an object to current transaction execution path

Parameters:
obj - object to be added to execution path

setExecutionPath

void setExecutionPath(java.util.ArrayList executionPath)
Sets execution path for current transaction

Parameters:
executionPath - executionPath to be set

getServiceAddress

com.adeptia.indigo.system.ObjectAddress getServiceAddress(java.lang.String name)
Gets object address of service used in the transaction. Service Address are stored in a map as key-value pair with key as service name


setServiceAddress

void setServiceAddress(java.lang.String name,
                       com.adeptia.indigo.system.ObjectAddress objAddress)
Sets object address of service used in transaction. Service Address are stored in a map as key-value pair with key as service name

Parameters:
name - service name used in transaction
objAddress - object address of service used in transaction

getServiceAddressMap

java.util.Map getServiceAddressMap()
Reurns service address map for current transaction


setServiceAddressMap

void setServiceAddressMap(java.util.Map serviceAddress)
Sets service address map for current transaction

Parameters:
serviceAddress - service address map to be set