Package org.tn5250j.framework.tn5250
Class tnvt
- java.lang.Object
-
- org.tn5250j.framework.tn5250.tnvt
-
- All Implemented Interfaces:
java.lang.Runnable
public final class tnvt extends java.lang.Object implements java.lang.Runnable
-
-
Field Summary
Fields Modifier and Type Field Description protected ICodePagecodePageprotected Screen5250screen52
-
Constructor Summary
Constructors Constructor Description tnvt(Session5250 session, Screen5250 screen52, boolean type, boolean support132)
-
Method Summary
Modifier and Type Method Description voidcancelInvite()Cancel Invite - taken from the rfc1205 - 5250 Telnet interface section 4.3 See notes inside methodbooleanconnect()booleanconnect(java.lang.String s, int port)booleandisconnect()protected boolean[]getActiveAidKeys()java.lang.StringgetAllocatedDeviceName()ICodePagegetCodePage()java.lang.StringgetDeviceName()java.lang.StringgetHostName()protected intgetOpCode()voidhostPrint(int aid)booleanisConnected()booleanisScanningEnabled()Checks whether command scanning is enabled.booleanisSslSocket()protected booleannegotiate(byte[] abyte0)voidrestoreScreen()voidrun()voidsaveScreen()booleansendAidKey(int aid)voidsendAttentionKey()Attention Key - See notes inside methodvoidsendHeartBeat()voidsendHelpRequest()Help request - See notes inside methodprotected voidsendNegResponse(int cat, int modifier, int uByte1, int uByte2, java.lang.String from)This routine handles sending negative responses back to the host.voidsendNegResponse2(int ec)voidsetCodePage(java.lang.String cp)voidsetDeviceName(java.lang.String name)voidsetProxy(java.lang.String proxyHost, java.lang.String proxyPort)voidsetScanningEnabled(boolean scan)Activate or deactivate the command scanning behaviour.voidsetSSLType(java.lang.String type)voidsignalBell()voidsystemRequest()Opens a dialog and asks the user before sending a requestvoidsystemRequest(char sr)voidsystemRequest(java.lang.String sr)System request, taken from the rfc1205, 5250 Telnet interface section 4.3voidtoggleDebug()booleanwaitingForInput()
-
-
-
Field Detail
-
screen52
protected Screen5250 screen52
-
codePage
protected ICodePage codePage
-
-
Constructor Detail
-
tnvt
public tnvt(Session5250 session, Screen5250 screen52, boolean type, boolean support132)
- Parameters:
session- 5250 session objectscreen52- 5250 screen objecttype- flagsupport132- flag
-
-
Method Detail
-
getHostName
public java.lang.String getHostName()
-
setSSLType
public void setSSLType(java.lang.String type)
-
setDeviceName
public void setDeviceName(java.lang.String name)
-
getDeviceName
public java.lang.String getDeviceName()
-
getAllocatedDeviceName
public java.lang.String getAllocatedDeviceName()
-
isConnected
public boolean isConnected()
-
isSslSocket
public boolean isSslSocket()
- Returns:
- true when SSL is used and socket is connected.
-
setProxy
public final void setProxy(java.lang.String proxyHost, java.lang.String proxyPort)
-
connect
public final boolean connect()
-
connect
public final boolean connect(java.lang.String s, int port)
-
disconnect
public final boolean disconnect()
-
sendHeartBeat
public final void sendHeartBeat() throws java.io.IOException- Throws:
java.io.IOException
-
sendAidKey
public final boolean sendAidKey(int aid)
-
sendHelpRequest
public final void sendHelpRequest()
Help request - See notes inside method
-
sendAttentionKey
public final void sendAttentionKey()
Attention Key - See notes inside method
-
systemRequest
public final void systemRequest()
Opens a dialog and asks the user before sending a request
-
systemRequest
public final void systemRequest(char sr)
- Parameters:
sr- - system request option
-
systemRequest
public final void systemRequest(java.lang.String sr)
System request, taken from the rfc1205, 5250 Telnet interface section 4.3- Parameters:
sr- system request option (allowed to be null, but than nothing happens)
-
cancelInvite
public final void cancelInvite()
Cancel Invite - taken from the rfc1205 - 5250 Telnet interface section 4.3 See notes inside method
-
hostPrint
public final void hostPrint(int aid)
-
toggleDebug
public final void toggleDebug()
-
getOpCode
protected final int getOpCode()
-
getActiveAidKeys
protected boolean[] getActiveAidKeys()
-
setScanningEnabled
public void setScanningEnabled(boolean scan)
Activate or deactivate the command scanning behaviour.- Parameters:
scan- if true, scanning is enabled; disabled otherwise.- See Also:
scan()
-
isScanningEnabled
public boolean isScanningEnabled()
Checks whether command scanning is enabled.- Returns:
- true is command scanning is enabled; false otherwise.
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
saveScreen
public final void saveScreen() throws java.io.IOException- Throws:
java.io.IOException
-
restoreScreen
public final void restoreScreen() throws java.io.IOException- Throws:
java.io.IOException- io exception
-
waitingForInput
public final boolean waitingForInput()
-
sendNegResponse
protected void sendNegResponse(int cat, int modifier, int uByte1, int uByte2, java.lang.String from)This routine handles sending negative responses back to the host. You can find a description of the types of responses to be sent back by looking at section 12.4 of the 5250 Functions Reference manual- Parameters:
cat- numbermodifier- numberuByte1- numberuByte2- numberfrom- a string
-
sendNegResponse2
public void sendNegResponse2(int ec)
-
negotiate
protected final boolean negotiate(byte[] abyte0) throws java.io.IOException- Throws:
java.io.IOException
-
setCodePage
public final void setCodePage(java.lang.String cp)
-
getCodePage
public final ICodePage getCodePage()
-
signalBell
public void signalBell()
- See Also:
Session5250.signalBell()
-
-