IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.cs.sessionpropagation
Class SessionPropagationWithWorkArea

java.lang.Object
  extended by com.ibm.btt.cs.sessionpropagation.SessionPropagationWithWorkArea
All Implemented Interfaces:
SessionPropagation

public class SessionPropagationWithWorkArea
extends java.lang.Object
implements SessionPropagation

This implementation of SessionPropagation interface will use WorkArea as Session Propagation.


Field Summary
static java.lang.String WORKAREA_JNDI
          If using WorkArea, the WorkArea JNDI name is necessary.
static java.lang.String WORKAREA_LOCATION
          If using WorkArea, the WorkArea lcation is necessary.
 
Constructor Summary
SessionPropagationWithWorkArea()
           
 
Method Summary
 BTTSystemData beginSessionPropagation()
          When begin session propagation, it will create WorkArea at first, and then set the session data into it.
 void beginWorkArea()
           
 void beginWorkArea(java.lang.String workAreaName)
          Demarcate the beginning of a UserWorkArea.
 void completeWorkArea()
          Complete the WorkArea if configured..
 void endSessionPropagation()
          Terminates the work area when processing is done.
 ChannelContext getChannelContext()
          Returns the channelContext.
 Context getContext()
          Returns the context.
 java.lang.Object getWorkAreaValueAt(java.lang.String key)
          Get the value in WorkArea according to the key
 void setChannelContext(ChannelContext channelContext)
          Sets the channelContext.
 void setContext(Context aContext)
          Set Context Object for retrieving session data
 void setSession(ChannelSession sessionObject)
          Set ChannelSession Object for retrieving session data
 void setWorkAreaValueAt(java.lang.String key, java.lang.Object value)
           
 void setWorkAreaValueAt(java.lang.String key, java.lang.Object value, com.ibm.websphere.workarea.PropertyModeType mode)
          Set the key and value into WorkArea.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WORKAREA_LOCATION

public static final java.lang.String WORKAREA_LOCATION
If using WorkArea, the WorkArea lcation is necessary. The default value is: iiop://localhost:2809/

See Also:
Constant Field Values

WORKAREA_JNDI

public static final java.lang.String WORKAREA_JNDI
If using WorkArea, the WorkArea JNDI name is necessary. The default value is: java:comp/websphere/UserWorkArea

See Also:
Constant Field Values
Constructor Detail

SessionPropagationWithWorkArea

public SessionPropagationWithWorkArea()
Method Detail

beginSessionPropagation

public BTTSystemData beginSessionPropagation()
                                      throws java.lang.Exception
When begin session propagation, it will create WorkArea at first, and then set the session data into it. Having to said that because session propagation will be used for not only the automaton, but also the RequestHandler, two ways to support for retrieving session data - from Context or ChannelContext

Specified by:
beginSessionPropagation in interface SessionPropagation
Returns:
Object If using WorkArea, nothing should be returned; Otherwise, SystemData Object should be returned.
Throws:
java.lang.Exception - Any Exception when begin Session Propagation.
See Also:
SessionPropagation.beginSessionPropagation()

endSessionPropagation

public void endSessionPropagation()
Terminates the work area when processing is done.

Specified by:
endSessionPropagation in interface SessionPropagation
See Also:
SessionPropagation.endSessionPropagation()

completeWorkArea

public void completeWorkArea()
Complete the WorkArea if configured..


beginWorkArea

public void beginWorkArea()
                   throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
beginWorkArea(String workAreaName)

beginWorkArea

public void beginWorkArea(java.lang.String workAreaName)
                   throws java.lang.Exception
Demarcate the beginning of a UserWorkArea. Here the workAreaName is not necessary. It used for tracing WorkArea.

Parameters:
workAreaName - WorkArea name used to trace.
Throws:
java.lang.Exception - Any exception when initialize/begin WorkArea. If exception throwed, the non-WorkArea mechanism will be used

setWorkAreaValueAt

public void setWorkAreaValueAt(java.lang.String key,
                               java.lang.Object value,
                               com.ibm.websphere.workarea.PropertyModeType mode)
                        throws DSEInvalidRequestException
Set the key and value into WorkArea. A key-value-mode triplet represents the data passed in the work area. The key-value part of the triplet represents the key to the data and the data itself, while the mode determines whether the property can be removed or modified by the receiving end. Further, data passes in one way only: from caller to remote receiver. Data added/removed/modified on the receiving end are not visible to the caller.

Parameters:
key - The key-value part of the triplet represents the key to the data
value - The data in WorkArea
mode - determines whether the property can be removed or modified by the receiving end. The mode include PropertyModeType.normal and PropertyModeType.read-only.
Throws:
DSEInvalidRequestException - Set value failed

setWorkAreaValueAt

public void setWorkAreaValueAt(java.lang.String key,
                               java.lang.Object value)
                        throws DSEInvalidRequestException
Throws:
DSEInvalidRequestException
See Also:
The default mode is PropertyModeType.normal.

getWorkAreaValueAt

public java.lang.Object getWorkAreaValueAt(java.lang.String key)
                                    throws java.lang.Exception
Get the value in WorkArea according to the key

Parameters:
key - The key-value part of the triplet represents the key to the data and the data itself.
Returns:
the Object in WorkArea.
Throws:
java.lang.Exception - Any exception about WorkArea.

setContext

public void setContext(Context aContext)
Description copied from interface: SessionPropagation
Set Context Object for retrieving session data

Specified by:
setContext in interface SessionPropagation
Parameters:
aContext - Automaton Context
See Also:
SessionPropagation.setContext(Context)

getContext

public Context getContext()
Returns the context.

Returns:
Context

setChannelContext

public void setChannelContext(ChannelContext channelContext)
Sets the channelContext.

Specified by:
setChannelContext in interface SessionPropagation
Parameters:
channelContext - The channelContext to set

getChannelContext

public ChannelContext getChannelContext()
Returns the channelContext.

Returns:
ChannelContext

setSession

public void setSession(ChannelSession sessionObject)
Description copied from interface: SessionPropagation
Set ChannelSession Object for retrieving session data

Specified by:
setSession in interface SessionPropagation
Parameters:
sessionObject - session object

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009