|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.DSENotifier | +--com.ibm.dse.base.Service | +--com.ibm.dse.services.itoc.ITOCConnection
This class maps an TCP/IP connection to an IMS.
Field Summary | |
protected static java.lang.String |
_CSMOKY
|
protected static java.lang.String |
_REQMOD
|
protected static java.lang.String |
_REQSTS
|
static java.lang.String |
COMPID
The component id. |
int |
datalength
|
int |
MaxSegs
|
protected char |
nad
|
protected static java.lang.String |
UserExit
|
Fields inherited from class com.ibm.dse.base.Service |
externalizer |
Fields inherited from class com.ibm.dse.base.DSENotifier |
handlersList,
name |
Fields inherited from interface com.ibm.dse.services.itoc.ITOCConnectionService |
automaticACK,
clientId,
commitMode,
CONFIRM,
dataStoreName,
enabled,
hostName,
LISTEN_THREAD,
lterm,
MFS_NO,
MFS_YES,
MODE0,
MODE1,
NONE,
password,
port,
receiveOnlyTimeout,
requestMFS,
SAFgroupName,
sendOnly,
synchLevel,
synchronousMode,
transaction,
UNSOLICITED,
userId,
version |
Fields inherited from interface com.ibm.dse.services.comms.CommonCommunicationsService |
CLOSED,
DATA,
DATASENT,
ERROR,
OPENED,
RECEIVERC,
TIMEOUT |
Constructor Summary | |
ITOCConnection()
This constructor creates a ITOCConnection object. |
|
ITOCConnection(java.lang.String aName)
This constructor creates a ITOCConnection object. |
Method Summary | |
void |
ccClose()
Closes the communications channel. |
void |
ccOpen()
Opens the communications channel. |
CCMessage |
ccReceiveData(long timeout)
Reads the data that has been received.If the data is not ready, it waits for the timeout. |
void |
ccSendData(java.lang.String aData)
Sends a Data through the communications channel. |
CCMessage |
ccSendReceive(java.lang.String aData,
long timeout)
Sends a String to communication services, and waits for a Timeout to receive the data. |
java.lang.String |
getCcClosedEventName()
Returns the value of the closed property. |
java.lang.String |
getCcDataReceivedEventName()
Returns the value of the data property. |
java.lang.String |
getCcErrorReceivedEventName()
Returns the value of the error property. |
java.lang.String |
getCcOpenedEventName()
Returns the value of the opened property. |
java.lang.String |
getClientId()
Returns the name of the clientId used by IMSTOC. |
int |
getCommitMode()
Returns the name of the commitMode used by IMSTOC. |
java.lang.String |
getDatastoreName()
Returns the name of the dataStoreName used by IMSTOC. |
java.lang.String |
getHostName()
Returns the name of the hostName used by IMSTOC. |
boolean |
getInUse()
Returns the value of the inUse property. |
java.lang.String |
getLTERM()
Returns the name of the LTERM used by IMSTOC. |
java.lang.String |
getPassword()
Returns the valueof the password used by IMSTOC user. |
int |
getPort()
Returns the value of the port used by the ITOC to communicate with the IMS. |
int |
getReceiveOnlyTimeout()
Returns the value of the receiveOnlyTimeout used by client. |
java.lang.String |
getSAFgroupName()
Returns the name of the SAFgroupName used by OTMA. |
java.lang.String |
getSynchronizationLevel()
Returns the value of the synchronizationLevel choiced by IMSTOC user. |
java.lang.String |
getTransaction()
Returns the valueof the trans used by IMSTOC user. |
java.lang.String |
getUserId()
Returns the value of the userId property. |
int |
getVersion()
Returns the value of the Version property. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes a ITOCConection object with the aTag attributes. |
void |
initInstance()
Initiates all processes depending commit mode. |
boolean |
isAutomaticACK()
Returns true if automaticACK property is enabled. |
boolean |
isConversationOn()
Returns true if conversationOn property is enabled. |
boolean |
isFree()
Returns true if ITOCConection instance is available. |
boolean |
isIsUnsolicitedThreadAlive()
Returns true if isUnsolicitedThreadAlive property is enabled. |
boolean |
isMFSModNameRequested()
Returns true if MFSModNameRequested property is enabled. |
boolean |
isOffline()
Returns true if ITOCConection instance is not available. |
boolean |
isSendOnly()
Returns true if sendOnly property is enabled. |
boolean |
isSynchronousMode()
Returns true if synchronousMode property is enabled. |
protected ITOCMessage |
readData(long time)
Read last message received from host. |
protected ITOCMessage |
receive(long time)
Performs the receive method. |
protected void |
receiveData()
Performs the receive method.Receives data from IMS. |
protected void |
receiveDeallocateReply()
Receives deallocate reply from the IMS. |
protected void |
receiveNACKReply()
Performs the receive method.Receives NACK reply from IMS. |
protected void |
receiveUnsolicited()
Performs the receive method.Working in commit mode 0, receive unsolicited messages. |
void |
run()
Run method. |
void |
send(java.lang.String aTransaction,
Context aContext,
FormatElement aFormat)
Sends transaction to IMS. |
void |
send(java.lang.String aTransaction,
Context aContext,
java.lang.String aFormatName)
Sends transaction to IMS. |
void |
send(java.lang.String aTransaction,
java.lang.String aData)
Sends transaction to IMS. |
void |
send(java.lang.String aTransaction,
java.lang.String[] segments)
Sends transaction to IMS. |
void |
sendACK()
Sends ACKNOWLEDGE message to IMS when working in confirm mode. |
protected void |
sendAutoACK()
Sends ACKNOWLEDGE message to IMS when working in confirm mode. |
protected void |
sendData(java.lang.String aData)
Sends transaction data to IMS. |
protected void |
sendDeallocate()
Sends deallocate request to the IMS. |
protected void |
sendHeader(java.lang.String aTransaction)
Sends transaction header to IMS. |
void |
sendNACK()
Sends NEGATIVE ACKNOWLEDGE message to IMS when working in confirm mode. |
void |
sendReceive(java.lang.String aTransaction,
Context aContext,
FormatElement aFormat,
long timeout)
Sends transaction to IMS and awaits for response. |
void |
sendReceive(java.lang.String aTransaction,
Context aContext,
java.lang.String aFormatName,
long timeout)
Sends transaction to IMS. |
ITOCMessage |
sendReceive(java.lang.String aTransaction,
java.lang.String[] segments,
long timeout)
Sends transaction to IMS and awaits for response. |
ITOCMessage |
sendReceive(java.lang.String aTransaction,
java.lang.String aData,
long timeout)
Sends transaction to IMS and awaits for response. |
protected void |
sendResumeTPipe()
Sends RESUMETPIPE message to OTMA. |
void |
setAutomaticACK(boolean newAutomaticACK)
Sets the value of the automaticACK property. |
void |
setClientId(java.lang.String newClientId)
Sets the value of the clientId property. |
void |
setCommitMode(int newCommitMode)
Sets the value of the commitMode property. |
void |
setDatastoreName(java.lang.String newDatastoreName)
Sets the value of the datastoreName property. |
void |
setHostName(java.lang.String newHostName)
Sets the value of the hostName property. |
void |
setInUse(boolean anInUse)
Sets the inUse property (boolean) value. |
void |
setIsUnsolicitedThreadAlive(boolean newIsUnsolicitedThreadAlive)
Sets the value of the isUnsolicitedThreadAlive property. |
void |
setLTERM(java.lang.String newLTERM)
Sets the value of the LTERM property.. |
void |
setMFSModNameRequested(boolean newMFSModNameRequested)
Sets the value of the MFSModNameRequested property. |
void |
setPassword(java.lang.String newPassword)
Sets the value of the password property. |
void |
setPort(int newPort)
Sets the value of the port property. |
void |
setReceiveOnlyTimeout(int newReceiveOnlyTimeout)
Sets the value of the receiveOnlyTimeout property. |
void |
setSAFgroupName(java.lang.String newSAFGroupName)
Sets the value of the SAFgroupName property. |
void |
setSendOnly(boolean newSendOnly)
Sets the value of the sendOnly property. |
void |
setSynchronizationLevel(java.lang.String newSynchronizationLevel)
Sets the value of the synchronizationLevel property. |
void |
setSynchronousMode(boolean newSynchronousMode)
Sets the value of the synchronousMode property. |
void |
setTransaction(java.lang.String transaction)
Sets the value of the trans property. |
void |
setUserExit(java.lang.String newUserExit)
Sets the value of the UserExit property. |
void |
setUserId(java.lang.String newUserId)
Sets the value of the UserId property. |
void |
setVersion(int newVersion)
Sets the value of the Version property. |
void |
startReceiveOnly()
Working in commit mode=0, starts unsolicited thread.User is ready to receive data from IMS. |
void |
terminate()
Terminates the conversation. |
java.lang.String |
toString()
Returns a visual representation of this object. |
Methods inherited from class com.ibm.dse.base.Service |
externalizer,
getExternalizer,
getTagName,
readExternal,
readExternal,
readObject,
removeExternal,
setExternalizer,
toStrings,
toTags,
writeExternal,
writeExternal |
Methods inherited from class com.ibm.dse.base.DSENotifier |
addHandler,
getHandlersList,
getName,
removeHandler,
setName,
signalEvent,
signalEvent,
signalEvent |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected char nad
public int MaxSegs
public int datalength
public static final java.lang.String COMPID
protected static java.lang.String UserExit
protected static final java.lang.String _CSMOKY
protected static final java.lang.String _REQSTS
protected static final java.lang.String _REQMOD
Constructor Detail |
public ITOCConnection()
public ITOCConnection(java.lang.String aName) throws java.io.IOException
aName
- java.lang.StringMethod Detail |
public void ccClose() throws DSECCException
aString
- java.lang.Stringpublic void ccOpen() throws DSECCException
public CCMessage ccReceiveData(long timeout) throws DSECCException
aTimeout
- longpublic void ccSendData(java.lang.String aData) throws DSECCException
aString
- java.lang.Stringpublic CCMessage ccSendReceive(java.lang.String aData, long timeout) throws DSECCException
aString
- java.lang.StringaTimeout
- longpublic java.lang.String getCcClosedEventName()
public java.lang.String getCcDataReceivedEventName()
public java.lang.String getCcErrorReceivedEventName()
public java.lang.String getCcOpenedEventName()
public java.lang.String getClientId()
public int getCommitMode()
public java.lang.String getDatastoreName()
public java.lang.String getHostName()
public boolean getInUse()
If ITOCConection instance is in use, this value must be true.
public java.lang.String getLTERM()
public java.lang.String getPassword()
public int getPort()
public int getReceiveOnlyTimeout()
This value is used when we are working on commit mode 0 and receiveonly protocol.
public java.lang.String getSAFgroupName()
public java.lang.String getSynchronizationLevel()
public java.lang.String getTransaction()
public java.lang.String getUserId()
public int getVersion()
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
aTag
- com.ibm.dse.base.Tagpublic void initInstance() throws DSECCException
Initiates all processes depending commit mode. Possibles values are:
public boolean isAutomaticACK()
public boolean isConversationOn()
public boolean isFree()
public boolean isIsUnsolicitedThreadAlive()
public boolean isMFSModNameRequested()
public boolean isOffline()
public boolean isSendOnly()
This property is used working on commit mode 0
public boolean isSynchronousMode()
protected ITOCMessage readData(long time)
timeout
- long. Is the maxmimum of milliseconds teh receiver will wait if there is not a message ready.protected ITOCMessage receive(long time) throws java.lang.Exception
long
- time. Timeout specified by the application.protected void receiveData() throws java.lang.Exception
protected void receiveDeallocateReply() throws java.lang.Exception
protected void receiveNACKReply() throws java.lang.Exception
protected void receiveUnsolicited() throws java.lang.Exception
public void run()
public void send(java.lang.String aTransaction, java.lang.String[] segments) throws java.io.IOException, java.lang.Exception
java.lang.String
- aTransaction. Transaction code to be sent.java.lang.String
- segments. Segments array relating transaction.public void send(java.lang.String aTransaction, Context aContext, FormatElement aFormat) throws DSEException, java.io.IOException, java.lang.Exception
java.lang.String
- aTransaction. Transaction code to be sent.aContext
- com.ibm.dse.base.ContextaFormat
- com.ibm.dse.base.FormatElementpublic void send(java.lang.String aTransaction, Context aContext, java.lang.String aFormatName) throws DSEException, java.io.IOException, java.lang.Exception
java.lang.String
- aTransaction. Transaction code to be sent.aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic void send(java.lang.String aTransaction, java.lang.String aData) throws java.io.IOException, java.lang.Exception
java.lang.String
- aTransaction. Transaction code to be sent.java.lang.String
- aData. Segment data.public void sendACK() throws java.io.IOException, java.lang.Exception
protected void sendAutoACK() throws java.io.IOException
protected void sendData(java.lang.String aData) throws java.io.IOException
java.lang.String
- aData. Segment data.protected void sendDeallocate() throws java.io.IOException
protected void sendHeader(java.lang.String aTransaction) throws java.io.IOException
java.lang.String
- aTrasaction. Transaction code.public void sendNACK() throws java.io.IOException
public ITOCMessage sendReceive(java.lang.String aTransaction, java.lang.String[] segments, long timeout) throws java.io.IOException, java.lang.Exception
aTransaction
- java.lang.Stringsegments
- array of Stringstimeout
- longpublic void sendReceive(java.lang.String aTransaction, Context aContext, FormatElement aFormat, long timeout) throws DSEException, java.io.IOException, java.lang.Exception
java.lang.String
- aTransaction. Transaction code to be sent.aContext
- com.ibm.dse.base.ContextaFormat
- com.ibm.dse.base.FormatElementtimeout
- longpublic void sendReceive(java.lang.String aTransaction, Context aContext, java.lang.String aFormatName, long timeout) throws DSEException, java.io.IOException, java.lang.Exception
java.lang.String
- aTransaction. Transaction code to be sent.aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringtimeout
- longpublic ITOCMessage sendReceive(java.lang.String aTransaction, java.lang.String aData, long timeout) throws java.io.IOException, java.lang.Exception
aTransaction
- java.lang.StringaData
- java.lang.Stringtimeout
- longprotected void sendResumeTPipe() throws java.io.IOException
public void setAutomaticACK(boolean newAutomaticACK)
newAutomaticACK
- boolean. The new value of the property.public void setClientId(java.lang.String newClientId)
newClientId
- java.lang.String The new value of the property.public void setCommitMode(int newCommitMode)
newCommitMode
- int. The new value of the property.public void setDatastoreName(java.lang.String newDatastoreName)
newDatastoreName
- intpublic void setHostName(java.lang.String newHostName)
newHostName
- java.lang.Stringpublic void setInUse(boolean anInUse)
Sets the inUse property (boolean) value.
anInUse
- boolean.The new value for the property.getInUse()
public void setIsUnsolicitedThreadAlive(boolean newIsUnsolicitedThreadAlive)
newIsUnsolicitedThreadAlive
- booleanpublic void setLTERM(java.lang.String newLTERM)
newLTERM
- java.lang.Stringpublic void setMFSModNameRequested(boolean newMFSModNameRequested)
newMFSModNameRequested
- booleanpublic void setPassword(java.lang.String newPassword)
newPassword
- java.lang.Stringpublic void setPort(int newPort)
newPort
- intpublic void setReceiveOnlyTimeout(int newReceiveOnlyTimeout)
Is used working on commit mode 0.
newReceiveOnlyTimeout
- intpublic void setSAFgroupName(java.lang.String newSAFGroupName)
newSAFGroupName
- java.lang.Stringpublic void setSendOnly(boolean newSendOnly)
newSendOnly
- booleanpublic void setSynchronizationLevel(java.lang.String newSynchronizationLevel)
newSynchronizationLevel
- java.lang.Stringpublic void setSynchronousMode(boolean newSynchronousMode)
newSynchronousMode
- booleanpublic final void setTransaction(java.lang.String transaction)
transaction
- java.lang.Stringpublic void setUserExit(java.lang.String newUserExit)
newUserExit
- java.lang.Stringpublic void setUserId(java.lang.String newUserId)
newUserId
- java.lang.Stringpublic void setVersion(int newVersion)
newVersion
- intpublic void startReceiveOnly()
public void terminate()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |