|
|||||||||
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.comms.Lu0SnaSession
Lu0 SNA session service.
Field Summary | |
protected BIDReceivedListener |
aBIDReceivedListener
|
protected MessageCancelledListener |
aMessageCancelledListener
|
protected MessageListener |
aMessageListener
|
protected NegativeResponseListener |
aNegativeResponseListener
|
protected PositiveResponseListener |
aPositiveResponseListener
|
protected SessionClosedListener |
aSessionClosedListener
|
protected SessionDownListener |
aSessionDownListener
|
protected SessionEstablishedListener |
aSessionEstablishedListener
|
protected SessionNotEstablishedListener |
aSessionNotEstablishedListener
|
protected UnsolicitedMessageCancelledListener |
aUnsolicitedMessageCancelledListener
|
protected UnsolicitedMessageListener |
aUnsolicitedMessageListener
|
static java.lang.String |
COMPID
|
Semaphore |
establishSem
|
protected java.beans.PropertyChangeSupport |
propertyChange
|
Semaphore |
sessionDownSem
|
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.comms.CommonCommunicationsService |
CLOSED,
DATA,
DATASENT,
ERROR,
OPENED,
RECEIVERC,
TIMEOUT |
Constructor Summary | |
Lu0SnaSession()
This constructor creates a Lu0SnaSession object. |
|
Lu0SnaSession(java.lang.String aString)
This constructor creates a Lu0SnaSession object with name aString . |
Method Summary | |
void |
addBIDReceivedListener(BIDReceivedListener newListener)
Generated to support the BIDReceived event. |
void |
addMessageCancelledListener(MessageCancelledListener newListener)
Generated to support the .MessageCancelled event. |
void |
addMessageListener(MessageListener newListener)
Generated to support the Message event. |
void |
addNegativeResponseListener(NegativeResponseListener newListener)
Generated to support the NegativeResponse event. |
void |
addPositiveResponseListener(PositiveResponseListener newListener)
Generated to support the PositiveResponse event. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Generated to support the propertyChange field. |
void |
addSessionClosedListener(SessionClosedListener newListener)
Generated to support the SessionClosed event. |
void |
addSessionDownListener(SessionDownListener newListener)
Generated to support the SessionDown event. |
void |
addSessionEstablishedListener(SessionEstablishedListener newListener)
Generated to support the SessionEstablished event. |
void |
addSessionNotEstablishedListener(SessionNotEstablishedListener newListener)
Generated to support the SessionNotEstablished event. |
void |
addUnsolicitedMessageCancelledListener(UnsolicitedMessageCancelledListener newListener)
Generated to support the UnsolicitedMessageCancelled event. |
void |
addUnsolicitedMessageListener(UnsolicitedMessageListener newListener)
Generated to support the UnsolicitedMessage event. |
void |
ccClose()
Closes the communications channel. |
void |
ccOpen()
Opens the communications channel. |
CCMessage |
ccReceiveData(long aTimeout)
Reads the data that has been received. |
void |
ccSendData(java.lang.String aString)
Sends aData thought the communications channel. |
CCMessage |
ccSendReceive(java.lang.String aString,
long aTimeout)
Sends aString to communcication services, and waits for aTimeout to receive the data |
void |
closeSession()
Closes the LU-LU end-to-end session. |
Handler |
dispatchEvent(DSEEventObject anEvent)
Handles session events. |
void |
establishSession()
Establishes the LU-LU session. |
void |
establishSession(int aTimeout)
Establishes the LU-LU session.Lu0SnaSession sends an INITSELF SNA command to initiate session with HostApplication name data , which is specified when the instance is created in the externalizer. |
protected void |
fireBIDReceived(BIDReceivedEvent event)
Supports listener events. |
void |
fireMessage(MessageEvent event)
Supports listener events. |
protected void |
fireMessageCancelled(MessageCancelledEvent event)
Supports listener events. |
protected void |
fireNegativeResponse(NegativeResponseEvent event)
Supports listener events. |
protected void |
firePositiveResponse(PositiveResponseEvent event)
Supports listener events. |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Generated to support the propertyChange field. |
protected void |
fireSessionClosed(SessionClosedEvent event)
Supports listener events. |
protected void |
fireSessionDown(SessionDownEvent event)
Supports listener events. |
protected void |
fireSessionEstablished(SessionEstablishedEvent event)
Supports listener events. |
protected void |
fireSessionNotEstablished(SessionNotEstablishedEvent event)
Supports listener events. |
protected void |
fireUnsolicitedMessage(UnsolicitedMessageEvent event)
Supports listener events. |
protected void |
fireUnsolicitedMessageCancelled(UnsolicitedMessageCancelledEvent event)
Supports listener events. |
boolean |
getAutomaticSessionEstablishment()
Gets the automaticSessionEstablishment property (java.lang.Boolean) value. |
boolean |
getBIDManaged()
Gets the BIDManaged property (boolean) value. |
Lu0Bind |
getBind()
Returns a Lu0Bind class that represents SNA BIND command received in the establishment of the current lu-lu session. |
java.lang.String |
getCcClosedEventName()
Returns the name of the closed event. |
java.lang.String |
getCcDataReceivedEventName()
Returns the name of the errorReceived event. |
java.lang.String |
getCcErrorReceivedEventName()
Returns the name of the errorReceived event. |
java.lang.String |
getCcOpenedEventName()
Returns the name of the opened event. |
boolean |
getChaining()
Returns the value of the chaining protocol. |
boolean |
getCloseIssued()
Gets the closeIssued property (boolean) value. |
boolean |
getCompression()
Gets the compression property (boolean) value. |
Semaphore |
getDataReadySem()
Gets the dataReadySem property (com.ibm.dse.base.Semaphore) value. |
java.lang.String |
getDefaultCodeSet()
Gets the defaultCodeSet property (java.lang.String) value. |
boolean |
getDefiniteResponseSolicited()
Returns the value of the definite response protocol. |
boolean |
getEndBracketSent()
Returns the value of the end bracket protocol. |
int |
getEstablishSessionRetries()
Gets the establishSessionRetries property (int) value. |
int |
getEstablishTimeout()
Gets the establishTimeout property (int) value. |
boolean |
getFmhHeaderSent()
Returns the value of the FMH sent protocol. |
boolean |
getFmhIncluded()
Returns the value of the FMH received protocol. |
java.lang.String |
getHostApplicationName()
Returns the host application name to which the session is going to be established. |
boolean |
getInUse()
Gets the in use. |
Lu0Message |
getLastMessageReceived()
Gets the lastMessageReceived property (com.ibm.dse.services.Lu0Message) value. |
Lu0Message |
getLastRuReceived()
Gets the lastRuReceived property (com.ibm.dse.services.Lu0Message) value. |
Lu0Message |
getLastRuSent()
Gets the lastRuSent property (com.ibm.dse.services.Lu0Message) value. |
java.lang.String |
getLastSense()
Gets the lastSense property (java.lang.String) value. |
static java.lang.String |
getLevel()
|
Semaphore |
getListenThreadSem()
Gets the listenThreadSem property (com.ibm.dse.base.Semaphore) value. |
java.lang.String |
getLuName()
Gets the luName property (java.lang.String) value. |
boolean |
getManageResponses()
Returns the value of the response protocol. |
boolean |
getMessageToLu()
Returns the value message received. |
protected java.beans.PropertyChangeSupport |
getPropertyChange()
Accessor for the propertyChange field. |
java.lang.String |
getReceivingChain()
Gets the receivingChain property (java.lang.String) value. |
boolean |
getResponsePendingToReceive()
Gets the responsePendingToReceive property (boolean) value. |
boolean |
getResponseRequired()
Gets the responseRequired property (boolean) value. |
boolean |
getSendingChain()
Gets the sendingChain property (boolean) value. |
java.lang.String |
getSeqNumber()
Gets the seqNumber property (java.lang.String) value. |
java.lang.String |
getSessionId()
Returns the value of the sessionId attribute. |
java.lang.String |
getSessionStatus()
Gets the communication status value. |
boolean |
getSynchronousMode()
Gets the synchronousMode property (boolean) value. |
int |
getTimeBetweenRetries()
Gets the timeBetweenRetries property (int) value. |
void |
handleEvent(java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext)
Handles events. |
void |
handleEvent(java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext,
java.lang.String aTID)
Handles events. |
protected void |
initializeCounter()
Sets the EstablishSessionCounter property to its default value. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes the Service reading its attributes values from aTag. |
void |
initInstance()
Initiates all handlers that have a default treatment. |
boolean |
isFree()
Returns if the session is free |
boolean |
isOffline()
Returns if the session is offline |
Lu0Message |
messageReceived()
Returns the last message received from host if there is one. |
Lu0Message |
messageReceived(Context aContext,
FormatElement aFormat)
Returns the last message received from host if there is one. |
Lu0Message |
messageReceived(Context aContext,
java.lang.String aFormatName)
Returns the last message received from host if there is one. |
Lu0Message |
peekMessageReceived()
Reads the last message received. |
Lu0Message |
receive(long aTimeout)
Returns the last message received as a Lu0SnaSession object.If there is no message, waits until the timeout expires. |
Lu0Message |
receive(long aTimeout,
Context aContext,
FormatElement aFormat)
Returns the last message received as a Lu0SnaSession object.If there is no message, waits until the timeout expires. |
Lu0Message |
receive(long aTimeout,
Context aContext,
java.lang.String aFormatName)
Returns the last message received as a Lu0SnaSession object.If there is no message, waits until the timeout expires. |
void |
removeBIDReceivedListener(BIDReceivedListener newListener)
Generated to support the BIDReceived event. |
void |
removeMessageCancelledListener(MessageCancelledListener newListener)
Generated to support the MessageCancelled event. |
void |
removeMessageListener(MessageListener newListener)
Generated to support the Message event. |
void |
removeNegativeResponseListener(NegativeResponseListener newListener)
Generated to support the NegativeResponse event. |
void |
removePositiveResponseListener(PositiveResponseListener newListener)
Generated to support the PositiveResponse event. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Generated to support the propertyChange field. |
void |
removeSessionClosedListener(SessionClosedListener newListener)
Generated to support the SessionClosed event. |
void |
removeSessionDownListener(SessionDownListener newListener)
Generated to support the SessionDown event. |
void |
removeSessionEstablishedListener(SessionEstablishedListener newListener)
Generated to support the SessionEstablished event. |
void |
removeSessionNotEstablishedListener(SessionNotEstablishedListener newListener)
Generated to support the SessionNotEstablished event. |
void |
removeUnsolicitedMessageCancelledListener(UnsolicitedMessageCancelledListener newListener)
Generated to support the UnsolicitedMessageCancelled event. |
void |
removeUnsolicitedMessageListener(UnsolicitedMessageListener newListener)
Generated to support the UnsolicitedMessage event. |
protected void |
resetSession()
|
void |
run()
Implements the runnable interface. |
void |
send(Context aContext,
FormatElement aFormat)
Formats and sends the context (aContext) for aFormat. |
void |
send(Context aContext,
java.lang.String aFormatName)
Formats and sends the context (aContext) for aFormatName. |
void |
send(java.lang.String aString)
Sends a message unit. |
void |
sendCancel()
Sends a SNA Cancel command. |
void |
sendCommand(java.lang.String aCommand)
Sends the SNA aCommand, which must be a valid command (Lustat, Signal) in hexadecimal. |
void |
sendFic(Context aContext,
FormatElement aFormat)
Sends a message with the First In Chain (FIC) identifier. |
void |
sendFic(Context aContext,
java.lang.String aFormatName)
Sends a message with the First In Chain (FIC) identifier. |
void |
sendFic(java.lang.String aString)
Sends a message with the First In Chain (FIC) identifier. |
void |
sendLic(Context aContext,
FormatElement aFormat)
Sends a message with the Last In Chain (LIC) identifier. |
void |
sendLic(Context aContext,
java.lang.String aFormatName)
Sends a message with the Last In Chain (LIC) identifier. |
void |
sendLic(java.lang.String aString)
Sends a message with the Last In Chain (LIC) identifier. |
void |
sendMic(Context aContext,
FormatElement aFormat)
Sends a message with the Middle In Chain (MIC) identifier. |
void |
sendMic(Context aContext,
java.lang.String aFormatName)
Sends a message with the Middle In Chain (MIC) identifier. |
void |
sendMic(java.lang.String aString)
Sends a message with the Middle In Chain (MIC) identifier. |
void |
sendNegativeResponse(java.lang.String aSense)
Sends a negative response to the last message received. |
void |
sendPositiveResponse()
Sends a positive response to the last message received. |
void |
sendReadyToReceive()
Sends a SNA RTR command. |
void |
setAutomaticSessionEstablishment(boolean automaticSessionEstablishment)
Sets the automaticSessionEstablishment property (boolean) value. |
void |
setBIDManaged(boolean BIDManaged)
Sets the BIDManaged property (boolean) value. |
void |
setChaining(boolean chaining)
Sets the chaining protocol. |
protected void |
setCloseIssued(boolean closeIssued)
Sets the closeIssued property (boolean) value. |
void |
setCompression(boolean compression)
Sets the compression property (boolean) value. |
void |
setDefaultCodeSet(java.lang.String defaultCodeSet)
Sets the defaultCodeSet property (java.lang.String) value. |
void |
setDefiniteResponseSolicited(boolean definiteResponseSolicited)
Sets the definite response protocol to: true:messages include the definite response identifier when possible false:messages do not include the definite response identifier(the default) |
void |
setEndBracketSent(boolean endBracketSent)
Sets the end bracket protocol to : true:messages include the end bracket indicator or false:messages do not include the end bracket indicator (the default) |
void |
setEstablishSessionRetries(int establishSessionRetries)
Sets the establishSessionRetries property (int) value. |
void |
setEstablishTimeout(int aEstablishTimeout)
Sets the timeBetweenRetries property (int) value. |
void |
setFmhHeaderSent(boolean fmhHeaderSent)
Sets the FMH sent protocol to : true:sent messages include the FM header or false:sent messages do not include the FM header(the default) |
void |
setFmhIncluded(boolean fmhIncluded)
Sets the FMH received protocol to : true:received messages include the FM header or false:received messages do not include the FM header(the default) |
void |
setHostApplicationName(java.lang.String hostApplicationName)
Sets the host application name. |
void |
setInUse(boolean anuse)
Sets the in use. |
void |
setLuName(java.lang.String luName)
Sets the luName property (java.lang.String) value. |
void |
setManageResponses(boolean manageResponses)
Sets the response protocol to : true:the application is responsible for sending a response to each chained message received; Positive responses (using sendPositiveResponse) has to be sent after a complete chain has been received. |
void |
setMessageToLu(boolean messageToLu)
Sets the type of the host partner session to: true:the destination is the remote Lu(the default) or false:the destination is the SSCP |
protected void |
setOpenIssued(boolean openIssued)
Sets the openIssued property (boolean) value. |
protected void |
setReceivingChain(java.lang.String receivingChain)
Sets the receivingChain property (java.lang.String) value. |
protected void |
setResponsePendingToReceive(boolean responsePendingToReceive)
Sets the responsePendingToReceive property (boolean) value. |
protected void |
setResponseRequired(boolean responseRequired)
Sets the responseRequired property (boolean) value. |
protected void |
setSessionStatus(java.lang.String sessionStatus)
Sets the sessionStatus property (java.lang.String) value. |
void |
setSynchronousMode(boolean synchronousMode)
Sets the synchronousMode property (boolean) value. |
protected void |
setTermIssued(boolean termIssued)
Sets the termIssued property (boolean) value. |
void |
setTimeBetweenRetries(int timeBetweenRetries)
Sets the timeBetweenRetries property (int) value. |
void |
stopHandlingEvent(java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext)
Stops event handling. |
void |
stopHandlingEvent(java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext,
java.lang.String aTID)
Stops event handling. |
void |
terminate()
Terminates the session. |
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 |
public static final java.lang.String COMPID
public Semaphore establishSem
public Semaphore sessionDownSem
protected transient java.beans.PropertyChangeSupport propertyChange
protected transient SessionNotEstablishedListener aSessionNotEstablishedListener
protected transient SessionEstablishedListener aSessionEstablishedListener
protected transient MessageListener aMessageListener
protected transient MessageCancelledListener aMessageCancelledListener
protected transient NegativeResponseListener aNegativeResponseListener
protected transient SessionDownListener aSessionDownListener
protected transient SessionClosedListener aSessionClosedListener
protected transient PositiveResponseListener aPositiveResponseListener
protected transient BIDReceivedListener aBIDReceivedListener
protected transient UnsolicitedMessageListener aUnsolicitedMessageListener
protected transient UnsolicitedMessageCancelledListener aUnsolicitedMessageCancelledListener
Constructor Detail |
public Lu0SnaSession()
public Lu0SnaSession(java.lang.String aString) throws java.io.IOException
aString
- java.lang.StringMethod Detail |
public void addBIDReceivedListener(BIDReceivedListener newListener)
newListener
- com.ibm.dse.services.comms.BIDReceivedListenerpublic void addMessageCancelledListener(MessageCancelledListener newListener)
newListener
- com.ibm.dse.services.comms.MessageCancelledListenerpublic void addMessageListener(MessageListener newListener)
newListener
- com.ibm.dse.services.comms.MessageListenerpublic void addNegativeResponseListener(NegativeResponseListener newListener)
newListener
- com.ibm.dse.services.comms.NegativeResponseListenerpublic void addPositiveResponseListener(PositiveResponseListener newListener)
newListener
- com.ibm.dse.services.comms.PositiveResponseListenerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void addSessionClosedListener(SessionClosedListener newListener)
newListener
- com.ibm.dse.services.comms.SessionClosedListenerpublic void addSessionDownListener(SessionDownListener newListener)
newListener
- com.ibm.dse.services.comms.SessionDownListenerpublic void addSessionEstablishedListener(SessionEstablishedListener newListener)
newListener
- com.ibm.dse.services.comms.SessionEstablishedListenerpublic void addSessionNotEstablishedListener(SessionNotEstablishedListener newListener)
newListener
- com.ibm.dse.services.comms.SessionNotEstablishedListenerpublic void addUnsolicitedMessageCancelledListener(UnsolicitedMessageCancelledListener newListener)
newListener
- com.ibm.dse.services.comms.UnsolicitedMessageCancelledListenerpublic void addUnsolicitedMessageListener(UnsolicitedMessageListener newListener)
newListener
- com.ibm.dse.services.comms.UnsolicitedMessageListenerpublic void ccClose() throws DSECCException
aString
- java.lang.Stringpublic void ccOpen() throws DSECCException
public CCMessage ccReceiveData(long aTimeout) throws DSECCException
aTimeout
- longpublic void ccSendData(java.lang.String aString) throws DSECCException
aString
- java.lang.Stringpublic CCMessage ccSendReceive(java.lang.String aString, long aTimeout) throws DSECCException
aString
- java.lang.StringaTimeout
- longpublic void closeSession() throws DSELu0InternalErrorException
Closes the LU-LU end-to-end session. The establishSession method is used to establish the session again. Lu0SnaSession send a TERMSELF message to close the session with the host application program. The host answers this call with UNBIND message, at this moment event sessionClosed is signaled.
public Handler dispatchEvent(DSEEventObject anEvent)
event
- com.ibm.dse.base.DSEEventObjectpublic void establishSession() throws DSELu0InternalErrorException
Establishes the LU-LU session. Lu0SnaSession sends an INITSELF SNA command to initiate session with HostApplication name data , which is specified when the instance is created in the externalizer. When SDT arrives SessionEstablished event is signaled. If the SSCP sends a NSPE command to the secondary Lu then the event SessionNotEstablished is notified.
public void establishSession(int aTimeout) throws DSELu0InternalErrorException
Establishes the LU-LU session.Lu0SnaSession sends an INITSELF SNA command to initiate session with HostApplication name data , which is specified when the instance is created in the externalizer. When SDT arrives SessionEstablished event is signaled. If the SSCP sends a NSPE command to the secondary Lu then the event SessionNotEstablished is notified. If aTimeout is reached the event SessionNotEstablished is notified.
protected void fireBIDReceived(BIDReceivedEvent event)
Supports listener events.
event
- com.ibm.dse.services.comms.BIDReceivedEventpublic void fireMessage(MessageEvent event)
Supports listener events.
event
- com.ibm.dse.services.comms.MessageEventprotected void fireMessageCancelled(MessageCancelledEvent event)
Supports listener events.
event
- com.ibm.dse.services.comms.MessageCancelledEventprotected void fireNegativeResponse(NegativeResponseEvent event)
Supports listener events.
event
- com.ibm.dse.services.comms.NegativeResponseEventprotected void firePositiveResponse(PositiveResponseEvent event)
Supports listener events.
event
- com.ibm.dse.services.comms.PositiveResponseEventpublic void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
protected void fireSessionClosed(SessionClosedEvent event)
Supports listener events.
event
- com.ibm.dse.services.comms.SessionClosedEventprotected void fireSessionDown(SessionDownEvent event)
Supports listener events.
event
- com.ibm.dse.services.comms.SessionDownEventprotected void fireSessionEstablished(SessionEstablishedEvent event)
Supports listener events.
event
- com.ibm.dse.services.comms.SessionEstablishedEventprotected void fireSessionNotEstablished(SessionNotEstablishedEvent event)
Supports listener events.
event
- com.ibm.dse.services.comms.SessionNotEstablishedEventprotected void fireUnsolicitedMessage(UnsolicitedMessageEvent event)
Supports listener events.
event
- com.ibm.dse.services.comms.UnsolicitedMessageEventprotected void fireUnsolicitedMessageCancelled(UnsolicitedMessageCancelledEvent event)
Supports listener events.
event
- com.ibm.dse.services.comms.UnsolicitedMessageCancelledEventpublic boolean getAutomaticSessionEstablishment()
Gets the automaticSessionEstablishment property (java.lang.Boolean) value.
setAutomaticSessionEstablishment(boolean)
public boolean getBIDManaged()
Gets the BIDManaged property (boolean) value.
setBIDManaged(boolean)
public Lu0Bind getBind()
Returns a Lu0Bind class that represents SNA BIND command received in the establishment of the current lu-lu session. If there is no session, nil is returned.
#setBind
public java.lang.String getCcClosedEventName()
public java.lang.String getCcDataReceivedEventName()
public java.lang.String getCcErrorReceivedEventName()
public java.lang.String getCcOpenedEventName()
public boolean getChaining()
Returns the value of the chaining protocol. If chaining is true, the messages received are complete chains. If chaining is false, the messages are received as they are sent by the host (FIC,MIC,LIC or OIC). The default value is false.
setChaining(boolean)
public boolean getCloseIssued()
Gets the closeIssued property (boolean) value.
setCloseIssued(boolean)
public boolean getCompression()
setCompression(boolean)
public Semaphore getDataReadySem()
Gets the dataReadySem property (com.ibm.dse.base.Semaphore) value.
#setDataReadySem
public java.lang.String getDefaultCodeSet()
setDefaultCodeSet(java.lang.String)
public boolean getDefiniteResponseSolicited()
Returns the value of the definite response protocol. If the value is true ,messages are sent with a Definite Response (if BIND allows it). If the value is false and if BIND specifies definite or exception, messages are sent with an exception response. The default value is false.
setDefiniteResponseSolicited(boolean)
public boolean getEndBracketSent()
Returns the value of the end bracket protocol. If the value is true, each message sent ends brackets. If the value is false, the messages sent do not have end brackets. The default value is false.
setEndBracketSent(boolean)
public int getEstablishSessionRetries()
setEstablishSessionRetries(int)
public int getEstablishTimeout()
setEstablishTimeout(int)
public boolean getFmhHeaderSent()
Returns the value of the FMH sent protocol. . If the value is true, the message sent includes an FM Header. The default value is false.
setFmhHeaderSent(boolean)
public boolean getFmhIncluded()
Returns the value of the FMH received protocol. If the value is true, the messages received with FMH preserve it. If the value is false, FMH is removed from the messages received. The default value is false.
setFmhIncluded(boolean)
public java.lang.String getHostApplicationName()
setHostApplicationName(java.lang.String)
public boolean getInUse()
Gets the in use.
public Lu0Message getLastMessageReceived()
Gets the lastMessageReceived property (com.ibm.dse.services.Lu0Message) value.
#setLastMessageReceived
public Lu0Message getLastRuReceived()
Gets the lastRuReceived property (com.ibm.dse.services.Lu0Message) value.
#setLastRuReceived
public Lu0Message getLastRuSent()
Gets the lastRuSent property (com.ibm.dse.services.Lu0Message) value.
#setLastRuSent
public java.lang.String getLastSense()
Gets the lastSense property (java.lang.String) value.
#setLastSense
public static java.lang.String getLevel() throws DSEException
public Semaphore getListenThreadSem()
Gets the listenThreadSem property (com.ibm.dse.base.Semaphore) value.
#setListenThreadSem
public java.lang.String getLuName()
Gets the luName property (java.lang.String) value.
setLuName(java.lang.String)
public boolean getManageResponses()
Returns the value of the response protocol. If the value is true, the application must send the sendNegativeResponse or sendPositiveResponse after receiving each chain. If the value is false, sendPositiveResponse is sent internally if it is needed. The default value is false.
setManageResponses(boolean)
public boolean getMessageToLu()
Returns the value message received. If the value is true, the next message is sent to the LU-LU session. If the value is false, the message is sent to the SSCP-LU session.
setMessageToLu(boolean)
protected java.beans.PropertyChangeSupport getPropertyChange()
public java.lang.String getReceivingChain()
Gets the receivingChain property (java.lang.String) value.
receivingChain can have one of the following values:
setReceivingChain(java.lang.String)
public boolean getResponsePendingToReceive()
Gets the responsePendingToReceive property (boolean) value.
setResponsePendingToReceive(boolean)
public boolean getResponseRequired()
Gets the responseRequired property (boolean) value.
setResponseRequired(boolean)
public boolean getSendingChain()
Gets the sendingChain property (boolean) value.
#setSendingChain
public java.lang.String getSeqNumber()
Gets the seqNumber property (java.lang.String) value.
#setSeqNumber
public java.lang.String getSessionId()
Returns the value of the sessionId attribute. When loading the Lu0SnaSession instance, a call to Communication Server is made to establish SSCP_LU session. If this call is made correctly, a Session Id identifies the new session.
#setSessionId
public java.lang.String getSessionStatus()
Gets the communication status value. Possible values are:
setSessionStatus(java.lang.String)
public boolean getSynchronousMode()
setSynchronousMode(boolean)
public int getTimeBetweenRetries()
setTimeBetweenRetries(int)
public void handleEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext) throws DSEInvalidArgumentException
public void handleEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aTID) throws DSEInvalidArgumentException
protected void initializeCounter()
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEInvalidArgumentException, DSELu0InternalErrorException, DSELu0InvalidRequestException
aTag
- com.ibm.dse.base.Tagpublic void initInstance() throws DSELu0InternalErrorException, DSEInvalidArgumentException
public boolean isFree()
Returns if the session is free
public boolean isOffline()
Returns if the session is offline
public Lu0Message messageReceived() throws DSELu0InternalErrorException
Returns the last message received from host if there is one.
public Lu0Message messageReceived(Context aContext, FormatElement aFormat) throws DSELu0InternalErrorException
Returns the last message received from host if there is one.
aContext
- com.ibm.dse.base.ContextaFormat
- com.ibm.dse.base.FormatElementpublic Lu0Message messageReceived(Context aContext, java.lang.String aFormatName) throws DSELu0InternalErrorException
Returns the last message received from host if there is one.
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic Lu0Message peekMessageReceived() throws DSELu0InternalErrorException
Reads the last message received. The message is not removed from the messages queue.
Return a Lu0Message if there is a message ready, null if there is no message ready.
Fails if, after receiving an RU of a multiRu chain (chaining = false), the host has cancelled the complete chain. After receiving a message, listenThread is NOT signaled.
This method should be received using the messageReceived method, otherwise no more data is received from the host.
public Lu0Message receive(long aTimeout) throws DSELu0InternalErrorException
Returns the last message received as a Lu0SnaSession object.If there is no message, waits until the timeout expires. In this case, an exception is raised.
aTimeOut
- intpublic Lu0Message receive(long aTimeout, Context aContext, FormatElement aFormat) throws DSELu0InternalErrorException
Returns the last message received as a Lu0SnaSession object.If there is no message, waits until the timeout expires. In this case, an exception is raised.
aTimeout
- longaContext
- com.ibm.dse.base.ContextaFormat
- com.ibm.dse.base.FormatElementpublic Lu0Message receive(long aTimeout, Context aContext, java.lang.String aFormatName) throws DSELu0InternalErrorException
Returns the last message received as a Lu0SnaSession object.If there is no message, waits until the timeout expires. In this case, an exception is raised.
aTimeout
- longaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic void removeBIDReceivedListener(BIDReceivedListener newListener)
newListener
- com.ibm.dse.services.comms.BIDReceivedListenerpublic void removeMessageCancelledListener(MessageCancelledListener newListener)
newListener
- com.ibm.dse.services.comms.MessageCancelledListenerpublic void removeMessageListener(MessageListener newListener)
newListener
- com.ibm.dse.services.comms.MessageListenerpublic void removeNegativeResponseListener(NegativeResponseListener newListener)
newListener
- com.ibm.dse.services.comms.NegativeResponseListenerpublic void removePositiveResponseListener(PositiveResponseListener newListener)
newListener
- com.ibm.dse.services.comms.PositiveResponseListenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removeSessionClosedListener(SessionClosedListener newListener)
newListener
- com.ibm.dse.services.comms.SessionClosedListenerpublic void removeSessionDownListener(SessionDownListener newListener)
newListener
- com.ibm.dse.services.comms.SessionDownListenerpublic void removeSessionEstablishedListener(SessionEstablishedListener newListener)
newListener
- com.ibm.dse.services.comms.SessionEstablishedListenerpublic void removeSessionNotEstablishedListener(SessionNotEstablishedListener newListener)
newListener
- com.ibm.dse.services.comms.SessionNotEstablishedListenerpublic void removeUnsolicitedMessageCancelledListener(UnsolicitedMessageCancelledListener newListener)
newListener
- com.ibm.dse.services.comms.UnsolicitedMessageCancelledListenerpublic void removeUnsolicitedMessageListener(UnsolicitedMessageListener newListener)
newListener
- com.ibm.dse.services.comms.UnsolicitedMessageListenerprotected void resetSession()
public void run()
Implements the runnable interface.
public void send(Context aContext, FormatElement aFormat) throws DSELu0InvalidRequestException, DSELu0InternalErrorException
Formats and sends the context (aContext) for aFormat.
aContext
- com.ibm.dse.base.ContextaFormat
- com.ibm.dse.base.FormatElementpublic void send(Context aContext, java.lang.String aFormatName) throws DSELu0InvalidRequestException, DSELu0InternalErrorException
Formats and sends the context (aContext) for aFormatName.
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic void send(java.lang.String aString) throws DSELu0InvalidRequestException, DSELu0InternalErrorException
Sends a message unit. If the length of the message is longer than the inbound RU size, it is broken into smaller RUs. This is transparent to the application which only sees the message as Only In Chain (OIC).
aString
- java.lang.String
aString is the formatted data that will be sent to host. If aString length is longer than the maximum inbound RU size, it has to be segmented into smaller RUs.
Fails if:
public void sendCancel() throws DSELu0InvalidRequestException, DSELu0InternalErrorException
Sends a SNA Cancel command.
public void sendCommand(java.lang.String aCommand) throws DSELu0InvalidRequestException, DSELu0InternalErrorException
Sends the SNA aCommand, which must be a valid command (Lustat, Signal) in hexadecimal.
aCommand
- java.lang.Stringpublic void sendFic(Context aContext, FormatElement aFormat) throws DSEException
Sends a message with the First In Chain (FIC) identifier.
aContext
- com.ibm.dse.base.ContextaFormat
- com.ibm.dse.base.FormatElementpublic void sendFic(Context aContext, java.lang.String aFormatName) throws DSEException
Sends a message with the First In Chain (FIC) identifier.
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic void sendFic(java.lang.String aString) throws DSELu0InvalidRequestException, DSELu0InternalErrorException
Sends a message with the First In Chain (FIC) identifier.
aString is the formatted data that will be sent to the host. This data is sent as First In Chain.
aString length must be smaller than the MAXIMUM inbound RU size.
Fails if:
aString
- java.lang.Stringpublic void sendLic(Context aContext, FormatElement aFormat) throws DSEException
Sends a message with the Last In Chain (LIC) identifier.
aContext
- com.ibm.dse.base.ContextaFormat
- com.ibm.dse.base.FormatElementpublic void sendLic(Context aContext, java.lang.String aFormatName) throws DSEException
Sends a message with the Last In Chain (LIC) identifier.
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic void sendLic(java.lang.String aString) throws DSELu0InvalidRequestException, DSELu0InternalErrorException
Sends a message with the Last In Chain (LIC) identifier.
aDataString
- java.lang.Stringpublic void sendMic(Context aContext, FormatElement aFormat) throws DSEException
Sends a message with the Middle In Chain (MIC) identifier.
aContext
- com.ibm.dse.base.ContextaFormat
- com.ibm.dse.base.FormatElementpublic void sendMic(Context aContext, java.lang.String aFormatName) throws DSEException
Sends a message with the Middle In Chain (MIC) identifier.
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic void sendMic(java.lang.String aString) throws DSELu0InvalidRequestException, DSELu0InternalErrorException
Sends a message with the Middle In Chain (MIC) identifier.
aDataString
- java.lang.Stringpublic void sendNegativeResponse(java.lang.String aSense) throws DSELu0InvalidRequestException, DSELu0InternalErrorException
Sends a negative response to the last message received. aSense is expected to be a valid SNA sense code in hexadecimal.
aSense
- java.lang.Stringpublic void sendPositiveResponse() throws DSELu0InvalidRequestException, DSELu0InternalErrorException
Sends a positive response to the last message received.
aSense
- java.lang.Stringpublic void sendReadyToReceive() throws DSELu0InvalidRequestException, DSELu0InternalErrorException
Sends a SNA RTR command. It is sent when the BID is managed by the application and it is ready to receive an unsolicited message previously denied.
public void setAutomaticSessionEstablishment(boolean automaticSessionEstablishment)
Sets the automaticSessionEstablishment property (boolean) value.
automaticSessionEstablishment
- The new value for the property.getAutomaticSessionEstablishment()
public void setBIDManaged(boolean BIDManaged)
Sets the BIDManaged property (boolean) value.
BIDManaged
- The new value for the property.getBIDManaged()
public void setChaining(boolean chaining)
Sets the chaining protocol.
chaining
- The new value for the property.getChaining()
protected void setCloseIssued(boolean closeIssued)
Sets the closeIssued property (boolean) value.
closeIssued
- The new value for the property.getCloseIssued()
public void setCompression(boolean compression)
compression
- The new value for the property.getCompression()
public void setDefaultCodeSet(java.lang.String defaultCodeSet)
defaultCodeSet
- The new value for the property.getDefaultCodeSet()
public void setDefiniteResponseSolicited(boolean definiteResponseSolicited)
Sets the definite response protocol to:
definiteResponseSolicited
- The new value for the property.getDefiniteResponseSolicited()
public void setEndBracketSent(boolean endBracketSent)
Sets the end bracket protocol to :
endBracketSent
- The new value for the property.getEndBracketSent()
public void setEstablishSessionRetries(int establishSessionRetries)
establishSessionRetries
- The new value for the property.getEstablishSessionRetries()
public void setEstablishTimeout(int aEstablishTimeout)
timeBetweenRetries
- The new value for the property.getTimeBetweenRetries()
public void setFmhHeaderSent(boolean fmhHeaderSent)
Sets the FMH sent protocol to :
fmhHeaderSent
- The new value for the property.getFmhHeaderSent()
public void setFmhIncluded(boolean fmhIncluded)
Sets the FMH received protocol to :
fmhIncluded
- The new value for the property.getFmhIncluded()
public void setHostApplicationName(java.lang.String hostApplicationName)
Sets the host application name.
hostApplicationName
- The new value for the property.getHostApplicationName()
public void setInUse(boolean anuse)
Sets the in use.
anuse
- booleanpublic void setLuName(java.lang.String luName)
Sets the luName property (java.lang.String) value.
luName
- The new value for the property.getLuName()
public void setManageResponses(boolean manageResponses)
Sets the response protocol to :
manageResponses
- The new value for the property.getManageResponses()
public void setMessageToLu(boolean messageToLu)
Sets the type of the host partner session to:
messageToLu
- The new value for the property.getMessageToLu()
protected void setOpenIssued(boolean openIssued)
Sets the openIssued property (boolean) value.
openIssued
- The new value for the property.#getOpenIssued
protected void setReceivingChain(java.lang.String receivingChain)
Sets the receivingChain property (java.lang.String) value.
receivingChain
- The new value for the property.getReceivingChain()
protected void setResponsePendingToReceive(boolean responsePendingToReceive)
Sets the responsePendingToReceive property (boolean) value.
responsePendingToReceive
- The new value for the property.getResponsePendingToReceive()
protected void setResponseRequired(boolean responseRequired)
Sets the responseRequired property (boolean) value.
responseRequired
- The new value for the property.getResponseRequired()
protected void setSessionStatus(java.lang.String sessionStatus)
Sets the sessionStatus property (java.lang.String) value.
sessionStatus
- The new value for the property.getSessionStatus()
public void setSynchronousMode(boolean synchronousMode)
synchronousMode
- The new value for the property.getSynchronousMode()
protected void setTermIssued(boolean termIssued)
Sets the termIssued property (boolean) value.
termIssued
- The new value for the property.#getTermIssued
public void setTimeBetweenRetries(int timeBetweenRetries)
timeBetweenRetries
- The new value for the property.getTimeBetweenRetries()
public void stopHandlingEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext) throws DSEHandlerNotFoundException, DSEInvalidArgumentException
public void stopHandlingEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aTID) throws DSEHandlerNotFoundException, DSEInvalidArgumentException
public void terminate() throws DSELu0InternalErrorException
Terminates the session. This method should be sent before de-referencing an Lu0SnaSession instance. It ends both the LU-LU session and the SSCP-LU session. The sessionStatus will be RESET.
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |