com.sun.emp.cci.eci
Class ECIInteractionSpec

java.lang.Object
  |
  +--com.sun.emp.cci.eci.ECIInteractionSpec
All Implemented Interfaces:
InteractionSpec, Serializable

public class ECIInteractionSpec
extends Object
implements InteractionSpec

The specification of an ECI interaction.

This class is a Java Bean.


Field Summary
static int UNSPECIFIED_COMMAREA_LENGTH
          A value to be used for the commArea property when the application wishes for the commarea length to be derived from the input record.
 
Fields inherited from interface javax.resource.cci.InteractionSpec
SYNC_RECEIVE, SYNC_SEND, SYNC_SEND_RECEIVE
 
Constructor Summary
ECIInteractionSpec()
          Create an interaction spec.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener pcl)
          Add a property change listener for all of the bound properties of this object.
 void addPropertyChangeListener(String propName, PropertyChangeListener pcl)
          Add a property change listener for a named bound property of this object.
 int getCommareaLength()
          Get the value of the commarea length.
 String getFunctionName()
          Get the name of the MTP program to execute.
 int getInteractionVerb()
          Get the current interaction verb.
 void removePropertyChangeListener(PropertyChangeListener pcl)
          Remove a property change listener for all of the bound properties of this object.
 void removePropertyChangeListener(String propName, PropertyChangeListener pcl)
          Add a property change listener for a named bound property of this object.
 void setCommareaLength(int caLen)
          Set the length of the commarea to use.
 void setFunctionName(String mtpProgName)
          Set the name of the MTP program to execute.
 void setInteractionVerb(int iv)
          Set the interaction verb for this interaction.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNSPECIFIED_COMMAREA_LENGTH

public static final int UNSPECIFIED_COMMAREA_LENGTH
A value to be used for the commArea property when the application wishes for the commarea length to be derived from the input record.

See Also:
setCommareaLength(int), getCommareaLength(), Constant Field Values
Constructor Detail

ECIInteractionSpec

public ECIInteractionSpec()
Create an interaction spec.

The default values for the properties of this object are:

Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener pcl)
Add a property change listener for all of the bound properties of this object.

Parameters:
pcl - The listener

addPropertyChangeListener

public void addPropertyChangeListener(String propName,
                                      PropertyChangeListener pcl)
Add a property change listener for a named bound property of this object.

Parameters:
propName - The name of the property
pcl - The listener

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener pcl)
Remove a property change listener for all of the bound properties of this object.

Parameters:
pcl - The listener

removePropertyChangeListener

public void removePropertyChangeListener(String propName,
                                         PropertyChangeListener pcl)
Add a property change listener for a named bound property of this object.

Parameters:
propName - The name of the property
pcl - The listener

setInteractionVerb

public void setInteractionVerb(int iv)
Set the interaction verb for this interaction.

Only SYNC_SEND_RECEIVE is supported.

Parameters:
iv - The interaction verb.
Throws:
IllegalArgumentException - if the verb is not SYNC_SEND_RECEIVE.
See Also:
getInteractionVerb()

getInteractionVerb

public int getInteractionVerb()
Get the current interaction verb.

This will always return SYNC_SEND_RECEIVE for this release.

Returns:
The interaction verb (SYNC_SEND_RECEIVE)
See Also:
setInteractionVerb(int)

setFunctionName

public void setFunctionName(String mtpProgName)
Set the name of the MTP program to execute.

If the supplied program name is longer than 8 characters in length, then the name will be truncated to 8 characters when the interaction is actually executed.

Throws:
NullPointerException - if the program name is null
See Also:
getFunctionName()

getFunctionName

public String getFunctionName()
Get the name of the MTP program to execute.

Returns:
The name of the program.
See Also:
setFunctionName(java.lang.String)

setCommareaLength

public void setCommareaLength(int caLen)
Set the length of the commarea to use.

The commarea length specified here is an override value to the commarea lengths derived from the Record supplied to the interaction. If a valid commarea length is specified, then it signifies the amount of data send to and from the server in an interaction. If it is not specified, then the amount of data is derived from the input Record length.

In order to use the Recorder derived value, a parameter of UNSPECIFIED_COMMAREA_LENGTH should be used.

Other that the above special value, the commarea length must be >=0 and <32500.

Parameters:
caLen - The length of the commarea (in bytes).
Throws:
IllegalArgumentException - if calen is not a valid value ( see above ).
See Also:
getCommareaLength()

getCommareaLength

public int getCommareaLength()
Get the value of the commarea length.

The special value of UNSPECIFIED_COMMAREA_LENGTH can be returned.

Returns:
The commarea length
See Also:
setCommareaLength(int)