Package com.iizix.term.ee
Class HostSessionEE
- java.lang.Object
- com.iizix.term.ee.HostSessionEE
 
- All Implemented Interfaces:
- HostSessionPeer
 - public class HostSessionEE extends java.lang.Object implements HostSessionPeer The EE host session peer.
- Field Summary- Fields inherited from interface com.iizix.term.HostSessionPeer- STATE_AnyLock, STATE_Connected, STATE_Connecting, STATE_Error, STATE_FieldFullError, STATE_InsertMode, STATE_Lock, STATE_MessageWaiting, STATE_MinusError, STATE_NonNumericError, STATE_OnFieldOrProtected, STATE_ReceiveWait, STATE_Reconnecting, STATE_Secure, STATE_Sending, STATE_SSCPLUOwned, STATE_SystemAvailable
 
 - Constructor Summary- Constructors - Constructor - Description - HostSessionEE(HostSession owner, TerminalProps properties)Constructor only from this package.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - boolean- canEdit()Checks if Edit mode can be turned on.- boolean- connect()Connects the session to host.- boolean- disconnect()Disconnects the session from host.- boolean- doesFieldHaveExtendedAttributes(HostField hostField)Checks if a host field has extended attributes or not.- boolean- doesHostNeedFieldExit(int x, int y, int offset, int length, java.lang.String string)For 5250 only: checks if a field has the attributes that requires this particular string to enter the data followed by a "Field Exit" or "Field Minus" key.- java.lang.String- getAllowedCharacters()Gets the string of characters that can be input by the user using the configured host code page for this session.- java.lang.String[]- getCanonicalScreenFileNames()Gets the capture screen canonical (absolute) file names.- EEScreen- getCaptureEditScreen()Gets the Edit screen for capture.- void- getCharactersAndAttributes(char[] chars, int[] attrs, int beginPos, int endPos)Gets the characters and attributes between two positions, including the end position.- void- getCharactersAndAttributes(char[] chars, int[] attrs, int beginPos, int endPos, char fieldOrNullChar)Gets the characters and attributes between two positions, including the end position.- int- getClientHostFieldFlags(HostField hostField)Gets flags that are required for the client host fields for local editing, etc.- SocketCommNIO- getComm()Gets the communication engine.- java.lang.String- getCurrentCanonicalScreenFileName()Gets the current screen canonical (absolute) file name, null for none.- Position- getCursor()Gets the current host cursor position.- java.lang.String- getDeviceName()Gets the device name of the session.- int- getHomeAddress()Gets the host address index on the screen.- HostSession- getHostSession()Gets the host session.- java.lang.String- getLastError(boolean doClear)Gets the last error message of the session.- int- getNewCharAttribute(HostField hostField)Gets the attribute to use for new characters in a field that contains extended attributes (always zero for non-3270).- int- getScreenLength()Gets the current screen length (width * height).- Size- getScreenSize()Gets the current screen size.- int- getSessionState()Gets the current session state.- boolean- hasScreenCaptures()Checks if it can connect, i.e.- boolean- hasUnderline(HostField f)Checks if the field has underline.- boolean- is3270()Checks if a session is 3270 or 5250.- boolean- isAutoReconnectSessionEnabled()Checks if the use of auto reconnect session is handled or not.- boolean- isCaptureEditable()Checks if this session is capture-editable.- boolean- isDisplayInSystemRequestMode()Never in system request mode.- boolean- isFieldFormatted()Checks if this host screen is field formatted.- boolean- isPrinter()Checks if this is a printer or not (always false).- boolean- isProcessingDataStream()Checks if the session is currently processing data stream commands to update the screen/cursor, state, etc.- void- onScreenChange(EEScreen ee)A new screen is activated.- void- onScreenLock()The screen is gone locked.- void- refreshHostFields(HostFields fields)Refreshes the host fields of the current session.- void- saveEditedCapture()Saves the EEScreen.- boolean- sendCharacterString(java.lang.String keys)Sends character keystrokes to host.- boolean- sendKey(int key)Sends character keystrokes to host.- void- setBackground(int x, int y, int width, int index)Assigns background character color.- boolean- setCursor(int x, int y)Sets the host cursor position.- void- setEditMode(boolean isEditMode)Switches Edit Mode for the session.- void- setForeground(int x, int y, int width, int index)Assigns foreground character color.- boolean- setHostField(HostField hostField, java.lang.String data, int[] attrs)Sets a host field fully with text data and perhaps attributes (if these are non-null).- boolean- setHostString(int x, int y, int offset, int length, java.lang.String string)Sets a string to a host field.- boolean- setHostStringAsKeys(int x, int y, int offset, int length, java.lang.String string)Sets a string to a host field just as if the user typed the characters.- boolean- setInsertMode(boolean m)Sets the insert mode on or off.- void- setLastError(java.lang.String errMsg)Sets the last error message of the session.- void- setRefreshedFields(EEField[] fields, int[] wattrs)Sets new fields after rebuild, also applies underlines.
 
- Constructor Detail- HostSessionEE- public HostSessionEE(HostSession owner, TerminalProps properties) throws java.io.IOException Constructor only from this package.- Throws:
- java.io.IOException
 
 
 - Method Detail- is3270- public boolean is3270() Checks if a session is 3270 or 5250.- Specified by:
- is3270in interface- HostSessionPeer
- Returns:
- true is always 3270.
 
 - isProcessingDataStream- public boolean isProcessingDataStream() Checks if the session is currently processing data stream commands to update the screen/cursor, state, etc.- Specified by:
- isProcessingDataStreamin interface- HostSessionPeer
 
 - connect- public boolean connect() Connects the session to host.- Specified by:
- connectin interface- HostSessionPeer
 
 - disconnect- public boolean disconnect() Disconnects the session from host.- Specified by:
- disconnectin interface- HostSessionPeer
 
 - sendCharacterString- public boolean sendCharacterString(java.lang.String keys) Sends character keystrokes to host.- Specified by:
- sendCharacterStringin interface- HostSessionPeer
 
 - sendKey- public boolean sendKey(int key) Sends character keystrokes to host.- Specified by:
- sendKeyin interface- HostSessionPeer
- See Also:
- HostSendKeys
 
 - setHostString- public boolean setHostString(int x, int y, int offset, int length, java.lang.String string)Sets a string to a host field.- Specified by:
- setHostStringin interface- HostSessionPeer
 
 - setHostStringAsKeys- public boolean setHostStringAsKeys(int x, int y, int offset, int length, java.lang.String string)Sets a string to a host field just as if the user typed the characters. The host field is first cleared with (3270) Clear EOF or (5250) Field Exit or Field Minus (for negative numbers in a numeric field). The string is then entered as a set of keystrokes, followed by a potential Field Exit or Field Minus (for negative numbers in a numeric field), but only for 5250.- Specified by:
- setHostStringAsKeysin interface- HostSessionPeer
 
 - doesHostNeedFieldExit- public boolean doesHostNeedFieldExit(int x, int y, int offset, int length, java.lang.String string)For 5250 only: checks if a field has the attributes that requires this particular string to enter the data followed by a "Field Exit" or "Field Minus" key. For 3270 it's always false.- Specified by:
- doesHostNeedFieldExitin interface- HostSessionPeer
- Returns:
- false=field doesn't require field exit, true=field requires field exit.
 
 - setCursor- public boolean setCursor(int x, int y)Sets the host cursor position.- Specified by:
- setCursorin interface- HostSessionPeer
 
 - getCursor- public Position getCursor() Gets the current host cursor position.- Specified by:
- getCursorin interface- HostSessionPeer
 
 - getScreenSize- public Size getScreenSize() Gets the current screen size.- Specified by:
- getScreenSizein interface- HostSessionPeer
 
 - getScreenLength- public int getScreenLength() Gets the current screen length (width * height).- Specified by:
- getScreenLengthin interface- HostSessionPeer
 
 - getSessionState- public int getSessionState() Gets the current session state.- Specified by:
- getSessionStatein interface- HostSessionPeer
- Returns:
- A combination of HostSessionPeer.STATE_* flags is returned.
 
 - getCharactersAndAttributes- public void getCharactersAndAttributes(char[] chars, int[] attrs, int beginPos, int endPos)Gets the characters and attributes between two positions, including the end position.- Specified by:
- getCharactersAndAttributesin interface- HostSessionPeer
 
 - getCharactersAndAttributes- public void getCharactersAndAttributes(char[] chars, int[] attrs, int beginPos, int endPos, char fieldOrNullChar)Gets the characters and attributes between two positions, including the end position. The character "fieldOrNullChar" is the character that will be used instead of field attributes and null characters.- Specified by:
- getCharactersAndAttributesin interface- HostSessionPeer
 
 - refreshHostFields- public void refreshHostFields(HostFields fields) Refreshes the host fields of the current session. The host session will add all available host fields sorted left to right, top to bottom.- Specified by:
- refreshHostFieldsin interface- HostSessionPeer
 
 - setInsertMode- public boolean setInsertMode(boolean m) Sets the insert mode on or off.- Specified by:
- setInsertModein interface- HostSessionPeer
- Returns:
- true for success, false for failure.
 
 - onScreenLock- public void onScreenLock() The screen is gone locked.
 - onScreenChange- public void onScreenChange(EEScreen ee) A new screen is activated.
 - getLastError- public java.lang.String getLastError(boolean doClear) Gets the last error message of the session.- Specified by:
- getLastErrorin interface- HostSessionPeer
- Returns:
- null if the session doesn't support it (3270 doesn't).
 
 - setLastError- public void setLastError(java.lang.String errMsg) Sets the last error message of the session.- Specified by:
- setLastErrorin interface- HostSessionPeer
 
 - getDeviceName- public java.lang.String getDeviceName() Gets the device name of the session.- Specified by:
- getDeviceNamein interface- HostSessionPeer
- Returns:
- null always.
 
 - isPrinter- public boolean isPrinter() Checks if this is a printer or not (always false).- Specified by:
- isPrinterin interface- HostSessionPeer
 
 - doesFieldHaveExtendedAttributes- public boolean doesFieldHaveExtendedAttributes(HostField hostField) Checks if a host field has extended attributes or not. 5250 never has, but 3270 could have, e.g. special highlighting.- Specified by:
- doesFieldHaveExtendedAttributesin interface- HostSessionPeer
 
 - getNewCharAttribute- public int getNewCharAttribute(HostField hostField) Gets the attribute to use for new characters in a field that contains extended attributes (always zero for non-3270).- Specified by:
- getNewCharAttributein interface- HostSessionPeer
 
 - getClientHostFieldFlags- public int getClientHostFieldFlags(HostField hostField) Gets flags that are required for the client host fields for local editing, etc.- Specified by:
- getClientHostFieldFlagsin interface- HostSessionPeer
 
 - isAutoReconnectSessionEnabled- public boolean isAutoReconnectSessionEnabled() Checks if the use of auto reconnect session is handled or not.- Specified by:
- isAutoReconnectSessionEnabledin interface- HostSessionPeer
 
 - getHomeAddress- public int getHomeAddress() Gets the host address index on the screen.- Specified by:
- getHomeAddressin interface- HostSessionPeer
 
 - setHostField- public boolean setHostField(HostField hostField, java.lang.String data, int[] attrs) Sets a host field fully with text data and perhaps attributes (if these are non-null).- Specified by:
- setHostFieldin interface- HostSessionPeer
- Returns:
- true for success, false for failure.
 
 - getAllowedCharacters- public java.lang.String getAllowedCharacters() Gets the string of characters that can be input by the user using the configured host code page for this session.- If the return string is empty, for the EE package for example, all characters are "input'able". - Specified by:
- getAllowedCharactersin interface- HostSessionPeer
 
 - isFieldFormatted- public boolean isFieldFormatted() Checks if this host screen is field formatted. This method is not like the one in HostScreen, this one checks directly to see if any fields are present.- Specified by:
- isFieldFormattedin interface- HostSessionPeer
 
 - isDisplayInSystemRequestMode- public boolean isDisplayInSystemRequestMode() Never in system request mode.- Specified by:
- isDisplayInSystemRequestModein interface- HostSessionPeer
 
 - getComm- public SocketCommNIO getComm() Gets the communication engine.- Specified by:
- getCommin interface- HostSessionPeer
- Returns:
- The NIO instance.
 
 - getHostSession- public HostSession getHostSession() Gets the host session.- Specified by:
- getHostSessionin interface- HostSessionPeer
 
 - getCanonicalScreenFileNames- public java.lang.String[] getCanonicalScreenFileNames() Gets the capture screen canonical (absolute) file names.
 - getCurrentCanonicalScreenFileName- public java.lang.String getCurrentCanonicalScreenFileName() Gets the current screen canonical (absolute) file name, null for none.
 - canEdit- public boolean canEdit() Checks if Edit mode can be turned on. This is only possible for single-screen files.
 - setEditMode- public void setEditMode(boolean isEditMode) Switches Edit Mode for the session.
 - setForeground- public void setForeground(int x, int y, int width, int index)Assigns foreground character color.
 - setBackground- public void setBackground(int x, int y, int width, int index)Assigns background character color.
 - hasUnderline- public boolean hasUnderline(HostField f) Checks if the field has underline.
 - isCaptureEditable- public boolean isCaptureEditable() Checks if this session is capture-editable.
 - getCaptureEditScreen- public EEScreen getCaptureEditScreen() Gets the Edit screen for capture.
 - hasScreenCaptures- public boolean hasScreenCaptures() Checks if it can connect, i.e. there are screens present.
 - setRefreshedFields- public void setRefreshedFields(EEField[] fields, int[] wattrs) Sets new fields after rebuild, also applies underlines.
 - saveEditedCapture- public void saveEditedCapture() throws java.io.IOExceptionSaves the EEScreen.- Throws:
- java.io.IOException- For file errors.