Package com.iizix.term.remote
Class RemoteHostSession
java.lang.Object
com.iizix.term.remote.RemoteHostSession
- All Implemented Interfaces:
- HostScreenListener,- HostSessionListener,- HostSessionOwner,- IPreSendHostSessionProps,- RemoteHostSessionListener
public class RemoteHostSession extends Object implements HostSessionOwner, IPreSendHostSessionProps, RemoteHostSessionListener, HostScreenListener
The host screen changes.
- Author:
- Christopher Mindus
- Field SummaryFields
- Constructor SummaryConstructorsConstructorDescription- RemoteHostSession- (Worker worker, HostSessionProps props, boolean needFields, boolean needPopupWindows) Creates a remote host session controller instance.
- Method SummaryModifier and TypeMethodDescription- void- attachHostSession- (HostSession hostSession, Runnable stateChangedListener) Attaches a host session to this instance.- voidDetaches from the host session.Gets the host session.Gets the SessionInfo.Gets the worker of the session.- void- onConnectChange- (HostSessionPeer peer, boolean connected) Notifies the session of a connect state change.- void- onCursorChanged- (int x, int y) The cursor position has changed.- void- onCursorPositionChange- (HostSessionPeer peer, int x, int y) Notifies the session that the cursor position has changed.- void- onFieldChange- (HostSessionPeer peer) Notifies the session that fields have changed.- int- onHostDataStreamProcessing- (HostSessionPeer peer, boolean isEntering) Called when the datastream enters or exits processing.- void- onHostDataStreamProcessing- (HostSessionPeer peer, boolean isEntering, int updates) N/A.- voidCalled when a host printer needs printing of a new page.- void- onPreSend- (HostSessionProps props) Called prior to sending the transaction update to the other party.- void- onScreenChange- (HostSessionPeer peer, int beginPos, int endPos) Notifies the session of a screen change.- void- onScreenChange- (HostSessionPeer peer, int begin, int end, char[] chars, byte[] attr1, byte[] attr2) Notifies the session of a screen change.- void- onScreenChanged- (int begin, int end) The screen has changed between two points in a wrapping fashion.- voidThe display has been cleared, i.e.- void- onScreenSizeChange- (HostSessionPeer peer, int cx, int cy) Notifies the session that the screen size has changed.- void- onScreenSizeChanged- (int cx, int cy) The screen size has changed.- void- onSessionFailure- (HostSessionPeer peer, Throwable exception) Called when a session has had a failure.- void- onStateChange- (HostSessionPeer peer) Notifies the session of a state change (such as insert mode, lock state, error state).- performTerminalCopy- (int x, int y, int cx, int cy) Performs a copy operation to a clip board string for terminal screen.- boolean- printSession- (HostSessionPeer peer) Called when the host (mainframe) has issued a Print Session (Print Local Copy).- void- soundAlarm- (HostSessionPeer peer) Sound alarm on the client.
- Field Details- isVerbosepublic boolean isVerboseThe verbose flag.
 
- Constructor Details- RemoteHostSessionpublic RemoteHostSession- (Worker worker, HostSessionProps props, boolean needFields, boolean needPopupWindows) Creates a remote host session controller instance.- Parameters:
- worker- The worker for the session.
- props- The host session properties.
- needFields- Changes in fields are of interest or not.
- needPopupWindows- Changes in pop-up windows are of interest or not.
 
 
- Method Details- attachHostSessionAttaches a host session to this instance.- Parameters:
- hostSession- The host session instance.
- stateChangedListener- The state change listener, null for none.
 
- detachHostSessionpublic void detachHostSession()Detaches from the host session.
- onPreSendCalled prior to sending the transaction update to the other party. Using this method, an implementing class can add additional data at the last moment.- Specified by:
- onPreSendin interface- IPreSendHostSessionProps
- Parameters:
- props- The host session properties.
 
- getHostSessionGets the host session.- Returns:
- The host session, null if not created.
 
- onScreenClearpublic void onScreenClear()The display has been cleared, i.e. entire screen blanked with spaces and default color.- Specified by:
- onScreenClearin interface- HostScreenListener
 
- onCursorChangedpublic void onCursorChanged- (int x, int y) The cursor position has changed.- Specified by:
- onCursorChangedin interface- HostScreenListener
- Parameters:
- x- X position on screen.
- y- Y position on screen.
 
- onScreenChangedpublic void onScreenChanged- (int begin, int end) The screen has changed between two points in a wrapping fashion.- Specified by:
- onScreenChangedin interface- HostScreenListener
- Parameters:
- begin- The beginning position.
- end- The end position (inclusive).
 
- onScreenSizeChangedpublic void onScreenSizeChanged- (int cx, int cy) The screen size has changed.- Specified by:
- onScreenSizeChangedin interface- HostScreenListener
- Parameters:
- cx- The new width.
- cy- The new height.
 
- onScreenChangeNotifies the session of a screen change.- Specified by:
- onScreenChangein interface- HostSessionListener
 
- onScreenChangepublic void onScreenChange- (HostSessionPeer peer, int begin, int end, char[] chars, byte[] attr1, byte[] attr2) Notifies the session of a screen change.- Specified by:
- onScreenChangein interface- RemoteHostSessionListener
- Parameters:
- peer- Host session peer.
- begin- Begin position, zero based.
- end- Ending position, zero-based (inclusive).
- chars- Characters data.
- attr1- Normal attribute array.
- attr2- Extended attribute array.
 
- onFieldChangeNotifies the session that fields have changed.- Specified by:
- onFieldChangein interface- HostSessionListener
 
- onScreenSizeChangeNotifies the session that the screen size has changed.- Specified by:
- onScreenSizeChangein interface- HostSessionListener
 
- onCursorPositionChangeNotifies the session that the cursor position has changed.- Specified by:
- onCursorPositionChangein interface- HostSessionListener
 
- onConnectChangeNotifies the session of a connect state change.- Specified by:
- onConnectChangein interface- HostSessionListener
 
- onStateChangeNotifies the session of a state change (such as insert mode, lock state, error state).- Specified by:
- onStateChangein interface- HostSessionListener
 
- onSessionFailureCalled when a session has had a failure.- Specified by:
- onSessionFailurein interface- HostSessionListener
 
- soundAlarmSound alarm on the client.- Specified by:
- soundAlarmin interface- HostSessionListener
 
- onHostDataStreamProcessingCalled when the datastream enters or exits processing. This enables the owner to "group" multiple notification events together.- Specified by:
- onHostDataStreamProcessingin interface- HostSessionOwner
- Parameters:
- peer- The peer.
- isEntering- Flag for entering or exiting.
- Returns:
- Bit flags 0x01 = characters changed, 0x02=fields changed.
 
- onHostPrintPageCalled when a host printer needs printing of a new page.- Specified by:
- onHostPrintPagein interface- HostSessionOwner
- Parameters:
- peer- The peer.
 
- printSessionCalled when the host (mainframe) has issued a Print Session (Print Local Copy).- Specified by:
- printSessionin interface- HostSessionOwner
- Parameters:
- peer- The peer.
- Returns:
- true for success, false for cancel.
 
- getWorkerGets the worker of the session.- Specified by:
- getWorkerin interface- HostSessionOwner
- Returns:
- The worker.
 
- getSessionInfoGets the SessionInfo.- Specified by:
- getSessionInfoin interface- HostSessionOwner
- Returns:
- The session info, never null.
 
- performTerminalCopyPerforms a copy operation to a clip board string for terminal screen.- Parameters:
- x- X position.
- y- Y position.
- cx- Width.
- cy- Height.
- Returns:
- null if the operation could not be completed due to invalid host session or parameters.
 
- onHostDataStreamProcessingN/A.- Specified by:
- onHostDataStreamProcessingin interface- HostSessionListener
- Parameters:
- peer- The peer.
- isEntering- The state of processing (true=before, false=after).
- updates- What has been updated on screen (bit flag: 0x01=characters, 0x02=fields).