Package org.beryx.textio.web
Class TextTerminalData
- java.lang.Object
-
- org.beryx.textio.web.TextTerminalData
-
public class TextTerminalData extends java.lang.Object
The data sent by the server to a polling web component. Includes:- an action to be executed by the web component (NONE, VIRTUAL, FLUSH, READ, READ_MASKED, CONTINUE_READ, CLEAR_OLD_INPUT, DISPOSE or ABORT).
- a boolean value indicating whether the terminal should reset its settings before performing the specified action.
- a list of
TextTerminalData.MessageGroup
s, each one consisting of a list of settings (represented asTextTerminalData.KeyValue
s) and a list of prompt messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TextTerminalData.Action
static class
TextTerminalData.Key
static class
TextTerminalData.KeyValue
A key-value pairstatic class
TextTerminalData.MessageGroup
A group of messages sharing the same settings
-
Constructor Summary
Constructors Constructor Description TextTerminalData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
addKey(java.lang.String keyStroke)
void
addKey(TextTerminalData.Key key)
java.lang.String
addMessage(java.lang.String message)
void
addRawMessage(java.lang.String message)
void
addSetting(java.lang.String key, java.lang.Object value)
void
addSetting(TextTerminalData.KeyValue keyVal)
void
clear()
TextTerminalData.Action
getAction()
java.lang.String
getActionData()
java.lang.String
getBookmark()
TextTerminalData
getCopy()
java.util.List<TextTerminalData.Key>
getHandlerKeys()
java.util.List<TextTerminalData.MessageGroup>
getMessageGroups()
java.lang.String
getResetToBookmark()
boolean
hasAction()
boolean
isEmpty()
boolean
isLineResetRequired()
boolean
isMoveToLineStartRequired()
boolean
isNewGroupRequiredForSetting()
boolean
isResetRequired()
TextTerminalData.MessageGroup
newMessageGroup()
void
setAction(TextTerminalData.Action action)
void
setActionData(java.lang.String actionData)
void
setBookmark(java.lang.String bookmark)
void
setLineResetRequired(boolean lineResetRequired)
void
setMoveToLineStartRequired(boolean moveToLineStartRequired)
void
setResetRequired(boolean resetRequired)
void
setResetToBookmark(java.lang.String resetToBookmark)
java.lang.String
toString()
-
-
-
Method Detail
-
getCopy
public TextTerminalData getCopy()
-
getMessageGroups
public java.util.List<TextTerminalData.MessageGroup> getMessageGroups()
-
newMessageGroup
public TextTerminalData.MessageGroup newMessageGroup()
-
isNewGroupRequiredForSetting
public boolean isNewGroupRequiredForSetting()
-
addSetting
public void addSetting(java.lang.String key, java.lang.Object value)
-
addSetting
public void addSetting(TextTerminalData.KeyValue keyVal)
-
addRawMessage
public void addRawMessage(java.lang.String message)
-
addMessage
public java.lang.String addMessage(java.lang.String message)
-
getAction
public TextTerminalData.Action getAction()
-
setAction
public void setAction(TextTerminalData.Action action)
-
getActionData
public java.lang.String getActionData()
-
setActionData
public void setActionData(java.lang.String actionData)
-
isResetRequired
public boolean isResetRequired()
-
setResetRequired
public void setResetRequired(boolean resetRequired)
-
isLineResetRequired
public boolean isLineResetRequired()
-
setLineResetRequired
public void setLineResetRequired(boolean lineResetRequired)
-
isMoveToLineStartRequired
public boolean isMoveToLineStartRequired()
-
setMoveToLineStartRequired
public void setMoveToLineStartRequired(boolean moveToLineStartRequired)
-
getBookmark
public java.lang.String getBookmark()
-
setBookmark
public void setBookmark(java.lang.String bookmark)
-
getResetToBookmark
public java.lang.String getResetToBookmark()
-
setResetToBookmark
public void setResetToBookmark(java.lang.String resetToBookmark)
-
isEmpty
public boolean isEmpty()
-
hasAction
public boolean hasAction()
-
getHandlerKeys
public java.util.List<TextTerminalData.Key> getHandlerKeys()
-
addKey
public void addKey(TextTerminalData.Key key)
-
addKey
public java.lang.String addKey(java.lang.String keyStroke)
-
clear
public void clear()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-