com.ibm.cics.server
Class Conversation

java.lang.Object
  extended by com.ibm.cics.server.API
      extended by com.ibm.cics.server.Conversation
Direct Known Subclasses:
ConversationPrincipalFacility

public class Conversation
extends API

This class implements the interface that is common to both ends of an APPC conversation.


Method Summary
 void converse(DataHolder data)
          DTC converse
 void converse(DataHolder data, int maxLength, boolean retainExcess)
          DTC Converse
 void flush()
          flush the connection
 void free()
          Free the connection
 byte[] getConvId()
          Get the conversation identifier for a conversation.
 boolean getDataComplete()
          Has all data been received?
 int getErrorCode()
          What was the last error code on this conversation?
 boolean getErrorOccurred()
          Has there been an error on this conversation?
 boolean getNoData()
          Have we received a message without data?
 boolean getSignalReceived()
          Have we received a SIGNAL?
 ConversationState getState()
           
 SyncLevel getSyncLevel()
           
 void issueAbend()
           
 void issueConfirmation()
           
 void issueError()
           
 void issuePrepare()
           
 void issueSignal()
           
 void receive(DataHolder data)
          DTC converse
 void receive(DataHolder data, int maxLength, boolean retainExcess)
          DTC converse
 void send(byte[] data)
          Send data.
 void send(byte[] data, ConversationSendOptions options)
           
 void send(ConversationSendOptions options)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

converse

public void converse(DataHolder data)
              throws EndOfChainIndicatorException,
                     InvalidRequestException,
                     LengthErrorException,
                     NotAllocatedException,
                     InboundSignalException,
                     TerminalException
DTC converse

Parameters:
data - the data to send
Throws:
EndOfChainIndicatorException - EOC occurred.
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
InboundSignalException - SIGNAL occurred.
TerminalException - TERMERR occurred.

converse

public void converse(DataHolder data,
                     int maxLength,
                     boolean retainExcess)
              throws EndOfChainIndicatorException,
                     InvalidRequestException,
                     LengthErrorException,
                     NotAllocatedException,
                     InboundSignalException,
                     TerminalException
DTC Converse

Parameters:
data - the data to send
maxLength - the maximum length of the data
retainExcess - should excess data be retained?
Throws:
EndOfChainIndicatorException - EOC occurred.
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
InboundSignalException - SIGNAL occurred.
TerminalException - TERMERR occurred.

flush

public void flush()
           throws InvalidRequestException,
                  NotAllocatedException
flush the connection

Throws:
InvalidRequestException
NotAllocatedException

free

public void free()
          throws InvalidRequestException,
                 NotAllocatedException,
                 NotAuthorisedException,
                 InvalidSystemIdException
Free the connection

Throws:
InvalidRequestException
NotAllocatedException
NotAuthorisedException
InvalidSystemIdException

getConvId

public byte[] getConvId()
Get the conversation identifier for a conversation.

Returns:
the conversation identifier

getDataComplete

public boolean getDataComplete()
Has all data been received?

Returns:
true if so

getErrorCode

public int getErrorCode()
What was the last error code on this conversation?

Returns:
the last error code

getErrorOccurred

public boolean getErrorOccurred()
Has there been an error on this conversation?

Returns:
true if there has been an error

getNoData

public boolean getNoData()
Have we received a message without data?

Returns:
true if there is no data

getSignalReceived

public boolean getSignalReceived()
Have we received a SIGNAL?

Returns:
true if there is a SIGNAL

getState

public ConversationState getState()
Returns:
the state of the connection

getSyncLevel

public SyncLevel getSyncLevel()
Returns:
the sync level

issueAbend

public void issueAbend()
                throws InvalidRequestException,
                       NotAllocatedException,
                       TerminalException
Throws:
InvalidRequestException
NotAllocatedException
TerminalException

issueConfirmation

public void issueConfirmation()
                       throws InvalidRequestException,
                              NotAllocatedException,
                              TerminalException
Throws:
InvalidRequestException
NotAllocatedException
TerminalException

issueError

public void issueError()
                throws InvalidRequestException,
                       NotAllocatedException,
                       TerminalException
Throws:
InvalidRequestException
NotAllocatedException
TerminalException

issuePrepare

public void issuePrepare()
                  throws InvalidRequestException,
                         NotAllocatedException,
                         TerminalException
Throws:
InvalidRequestException
NotAllocatedException
TerminalException

issueSignal

public void issueSignal()
                 throws InvalidRequestException,
                        NotAllocatedException,
                        TerminalException
Throws:
InvalidRequestException
NotAllocatedException
TerminalException

receive

public void receive(DataHolder data)
             throws EndOfChainIndicatorException,
                    InvalidRequestException,
                    LengthErrorException,
                    NotAllocatedException,
                    InboundSignalException,
                    TerminalException
DTC converse

Parameters:
data - the data received on the connection
Throws:
EndOfChainIndicatorException - EOC occurred.
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
InboundSignalException - SIGNAL occurred.
TerminalException - TERMERR occurred.

receive

public void receive(DataHolder data,
                    int maxLength,
                    boolean retainExcess)
             throws EndOfChainIndicatorException,
                    InvalidRequestException,
                    LengthErrorException,
                    NotAllocatedException,
                    InboundSignalException,
                    TerminalException
DTC converse

Parameters:
data - the data received on the connection
maxLength - the maximum length to receive
retainExcess - should excess data be retained?
Throws:
EndOfChainIndicatorException - EOC occurred.
InvalidRequestException - INVREQ occurred.
LengthErrorException - LENGERR occurred.
NotAllocatedException - NOTALLOC occurred.
InboundSignalException - SIGNAL occurred.
TerminalException - TERMERR occurred.

send

public void send(byte[] data)
          throws InvalidRequestException,
                 LengthErrorException,
                 NotAllocatedException,
                 InboundSignalException,
                 TerminalException
Send data.

If you want to achieve the effect of specifying LENGTH(0) in the EXEC CICS command interface, you must pass in an array of length 0.

If you want to achieve the effect of not sending any data, pass in null as the data.

Parameters:
data - the data to send
Throws:
InvalidRequestException
LengthErrorException
NotAllocatedException
InboundSignalException
TerminalException

send

public void send(byte[] data,
                 ConversationSendOptions options)
          throws InvalidRequestException,
                 LengthErrorException,
                 NotAllocatedException,
                 InboundSignalException,
                 TerminalException
Parameters:
data - the data to send
options - the options to set
Throws:
InvalidRequestException
LengthErrorException
NotAllocatedException
InboundSignalException
TerminalException

send

public void send(ConversationSendOptions options)
          throws InvalidRequestException,
                 LengthErrorException,
                 NotAllocatedException,
                 InboundSignalException,
                 TerminalException
Parameters:
options - the options to set
Throws:
InvalidRequestException
LengthErrorException
NotAllocatedException
InboundSignalException
TerminalException