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.

Since CICS TS version:
1.3
Since package version:
1.0

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.
Since CICS TS version:
1.3
Since package version:
1.0

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.
Since CICS TS version:
1.3
Since package version:
1.0

flush

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

Throws:
InvalidRequestException - INVREQ
NotAllocatedException - NOTALLOC
Since CICS TS version:
1.3
Since package version:
1.0

free

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

Throws:
InvalidRequestException - INVREQ
NotAllocatedException - NOTALLOC
NotAuthorisedException - NOTAUTH
InvalidSystemIdException - SYSIDERR
Since CICS TS version:
1.3
Since package version:
1.0

getConvId

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

Returns:
the conversation identifier
Since CICS TS version:
1.3
Since package version:
1.0

getDataComplete

public boolean getDataComplete()
Has all data been received?

Returns:
true if so
Since CICS TS version:
1.3
Since package version:
1.0

getErrorCode

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

Returns:
the last error code
Since CICS TS version:
1.3
Since package version:
1.0

getErrorOccurred

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

Returns:
true if there has been an error
Since CICS TS version:
1.3
Since package version:
1.0

getNoData

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

Returns:
true if there is no data
Since CICS TS version:
1.3
Since package version:
1.0

getSignalReceived

public boolean getSignalReceived()
Have we received a SIGNAL?

Returns:
true if there is a SIGNAL
Since CICS TS version:
1.3
Since package version:
1.0

getState

public ConversationState getState()
Returns:
the state of the connection
Since CICS TS version:
1.3
Since package version:
1.0

getSyncLevel

public SyncLevel getSyncLevel()
Returns:
the sync level
Since CICS TS version:
1.3
Since package version:
1.0

issueAbend

public void issueAbend()
                throws InvalidRequestException,
                       NotAllocatedException,
                       TerminalException
Throws:
InvalidRequestException - INVREQ
NotAllocatedException - NOTALLOC
TerminalException - TERMERR
Since CICS TS version:
1.3
Since package version:
1.0

issueConfirmation

public void issueConfirmation()
                       throws InvalidRequestException,
                              NotAllocatedException,
                              TerminalException
Throws:
InvalidRequestException - INVREQ
NotAllocatedException - NOTALLOC
TerminalException - TERMERR
Since CICS TS version:
1.3
Since package version:
1.0

issueError

public void issueError()
                throws InvalidRequestException,
                       NotAllocatedException,
                       TerminalException
Throws:
InvalidRequestException - INVREQ
NotAllocatedException - NOTALLOC
TerminalException - TERMERR
Since CICS TS version:
1.3
Since package version:
1.0

issuePrepare

public void issuePrepare()
                  throws InvalidRequestException,
                         NotAllocatedException,
                         TerminalException
Throws:
InvalidRequestException - INVREQ
NotAllocatedException - NOTALLOC
TerminalException - TERMERR
Since CICS TS version:
1.3
Since package version:
1.0

issueSignal

public void issueSignal()
                 throws InvalidRequestException,
                        NotAllocatedException,
                        TerminalException
Throws:
InvalidRequestException - INVREQ
NotAllocatedException - NOTALLOC
TerminalException - TERMERR
Since CICS TS version:
1.3
Since package version:
1.0

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.
Since CICS TS version:
1.3
Since package version:
1.0

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.
Since CICS TS version:
1.3
Since package version:
1.0

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 - INVREQ
LengthErrorException - LENGERR
NotAllocatedException - NOTALLOC
InboundSignalException - SIGNAL
TerminalException - TERMERR
Since CICS TS version:
1.3
Since package version:
1.0

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 - INVREQ
LengthErrorException - LENGERR
NotAllocatedException - NOTALLOC
InboundSignalException - SIGNAL
TerminalException - TERMERR
Since CICS TS version:
1.3
Since package version:
1.0

send

public void send(ConversationSendOptions options)
          throws InvalidRequestException,
                 LengthErrorException,
                 NotAllocatedException,
                 InboundSignalException,
                 TerminalException
Parameters:
options - the options to set
Throws:
InvalidRequestException - INVREQ
LengthErrorException - LENGERR
NotAllocatedException - NOTALLOC
InboundSignalException - SIGNAL
TerminalException - TERMERR
Since CICS TS version:
1.3
Since package version:
1.0