|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jagacy.AbstractSession
Supports a screen-scraping session.
Method Summary | |
void |
abort()
Aborts the session. |
void |
close()
Closes the session. |
Location |
createLocation(int row,
int column)
Creates a Location object. |
Location |
createLocation(java.lang.String propertyPrefix)
Creates a location object. |
protected abstract UserInterface |
createUi()
Creates a user interface. |
protected void |
finalize()
|
int |
getAttributeForPosition(int row,
int column)
Used internally. |
int |
getHeight()
Returns the screen's height. |
Logger |
getLogger()
Returns the logger. |
java.lang.String |
getName()
Returns the session name. |
JagacyProperties |
getProperties()
Returns the Jagacy properties. |
int |
getWidth()
Returns the screen's width. |
boolean |
isInsertOn()
Determines if insert is on or not. |
protected void |
logoff()
This method is called by close and is meant to be overidden by inheriting classes. |
protected boolean |
logon()
This method is called by open and is meant to be overidden by inheriting classes. |
void |
open()
Opens the session. |
java.lang.String |
read(int length)
Reads a string at the current cursor position. |
java.lang.String |
read(java.lang.String lengthProperty)
Reads a string at the current cursor position. |
long |
readAlarmCount()
Returns the number of times the alarm has sounded. |
int[] |
readCursor()
Deprecated. As of Jagacy 3270 1.2 / Jagacy VT 1.0, replaced by readCursorLocation() |
Location |
readCursorLocation()
Reads the cursor. |
java.lang.String |
readPosition(int row,
int column,
int length)
Reads a string at the given coordinates. |
java.lang.String |
readPosition(Location location,
int length)
Reads a string at the given location. |
java.lang.String |
readPosition(java.lang.String propertyPrefix)
Reads a string at the given coordinates. |
java.lang.String |
readRow(int row)
Returns the row. |
java.lang.String[] |
readScreen()
Returns the screen. |
char[] |
readScreenText()
Returns the screen as character text. |
boolean |
waitForChange(int timeout)
Waits for the screen to change and the keyboard to unlock. |
boolean |
waitForChange(java.lang.String timeoutProperty)
Waits for the screen to change and the keyboard to unlock. |
boolean |
waitForPosition(int row,
int column,
java.lang.String value,
int timeout)
Waits (in 100 millisecond intervals) for the value to appear at the given coordinates. |
boolean |
waitForPosition(Location location,
java.lang.String value,
int timeout)
Waits (in 100 millisecond intervals) for the value to appear at the given location. |
boolean |
waitForPosition(java.lang.String propertyPrefix,
int timeout)
Waits (in 100 millisecond intervals) for the value to appear at the given coordinates. |
boolean |
waitForPosition(java.lang.String propertyPrefix,
java.lang.String timeoutProperty)
Waits (in 100 millisecond intervals) for the value to appear at the given coordinates. |
boolean |
waitForPosition(java.lang.String propertyPrefix,
java.lang.String value,
int timeout)
Waits (in 100 millisecond intervals) for the value to appear at the given coordinates. |
boolean |
waitForPosition(java.lang.String propertyPrefix,
java.lang.String value,
java.lang.String timeoutProperty)
Waits (in 100 millisecond intervals) for the value to appear at the given coordinates. |
boolean |
waitForUnlock(int timeout)
Waits for the keyboard to unlock. |
boolean |
waitForUnlock(java.lang.String timeoutProperty)
Waits for the keyboard to unlock. |
void |
writeAfterLabel(java.lang.String propertyPrefix)
Writes a string in the next unprotected field after a protected label. |
void |
writeAfterLabel(java.lang.String label,
java.lang.String value)
Writes a string in the next unprotected field after a protected label. |
void |
writeAfterLabelProperty(java.lang.String labelProperty,
java.lang.String value)
Writes a string in the next unprotected field after a protected label. |
void |
writeCursor(int row,
int column)
Writes the cursor at the given coordinates. |
void |
writeCursor(Location location)
Writes the cursor at the given location. |
void |
writeCursor(java.lang.String propertyPrefix)
Writes the cursor at the given coordinates. |
Key |
writeKey(Key key)
Writes the given key. |
Key |
writeKey(java.lang.String keyProperty)
Writes the given key. |
void |
writePosition(int row,
int column,
java.lang.String value)
Writes a string at the given coordinates. |
void |
writePosition(Location location,
java.lang.String value)
Writes a string at the given location. |
void |
writePosition(java.lang.String propertyPrefix)
Writes a string at the coordinates given by the properties. |
void |
writePosition(java.lang.String propertyPrefix,
java.lang.String value)
Writes a string at the coordinates given by the properties. |
void |
writeProperty(java.lang.String valueProperty)
Writes the contents of valueProperty at the current cursor position. |
void |
writeString(java.lang.String value)
Writes a string at the current cursor position. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
protected abstract UserInterface createUi() throws JagacyException
JagacyException
- If an error occurs.public void open() throws JagacyException
JagacyException
- If an error occurs.protected boolean logon() throws JagacyException
JagacyException
- If an error occurs.public java.lang.String getName()
public JagacyProperties getProperties()
public Logger getLogger()
public boolean isInsertOn()
public Location createLocation(int row, int column) throws JagacyException
row
- Row of location.column
- Column of location.
JagacyException
- If an error occurs.public Location createLocation(java.lang.String propertyPrefix) throws JagacyException
<propertyPrefix>.row
<propertyPrefix>.column
propertyPrefix
- Prefix used to lookup properties.
JagacyException
- If an error occurs.public void writeString(java.lang.String value) throws JagacyException
value
- String to write.
JagacyException
- If an error occurs.public void writeProperty(java.lang.String valueProperty) throws JagacyException
valueProperty
- Property to lookup.
JagacyException
- If an error occurs.public void writePosition(int row, int column, java.lang.String value) throws JagacyException
row
- Row (indexed from 0).column
- Column (indexed from 0).value
- Value to write.
JagacyException
- If an error occurs.public void writePosition(Location location, java.lang.String value) throws JagacyException
location
- Location.value
- Value to write.
JagacyException
- If an error occurs.public void writePosition(java.lang.String propertyPrefix) throws JagacyException
<propertyPrefix>.row
<propertyPrefix>.column
<propertyPrefix>.value
propertyPrefix
- Prefix used to lookup properties.
JagacyException
- If an error occurs.public void writePosition(java.lang.String propertyPrefix, java.lang.String value) throws JagacyException
<propertyPrefix>.row
<propertyPrefix>.column
propertyPrefix
- Prefix used to lookup properties.value
- String to write.
JagacyException
- If an error occurs.public void writeAfterLabel(java.lang.String label, java.lang.String value) throws JagacyException
label
- Label to find.value
- String to write after label.
JagacyException
- If an error occurs.public void writeAfterLabel(java.lang.String propertyPrefix) throws JagacyException
<propertyPrefix>.label
<propertyPrefix>.value
propertyPrefix
- Prefix used to lookup properties.
JagacyException
- If an error occurs.public void writeAfterLabelProperty(java.lang.String labelProperty, java.lang.String value) throws JagacyException
labelProperty
- Property to lookup.value
- String to write after label.
JagacyException
- If an error occurs.public java.lang.String readRow(int row) throws JagacyException
row
- Row to read.
JagacyException
- If an error occurs.public java.lang.String[] readScreen() throws JagacyException
JagacyException
- If an error occurs.public char[] readScreenText() throws JagacyException
JagacyException
- If an error occurs.public java.lang.String read(int length) throws JagacyException
length
- Length of string to read.
JagacyException
- If an error occurs.public java.lang.String read(java.lang.String lengthProperty) throws JagacyException
lengthProperty
- Property to lookup.
JagacyException
- If an error occurs.public java.lang.String readPosition(int row, int column, int length) throws JagacyException
row
- Row (indexed from 0).column
- Column (indexed from 0).length
- Length of string to read.
JagacyException
- If an error occurs.public java.lang.String readPosition(Location location, int length) throws JagacyException
location
- Location of string to read.length
- Length of string to read.
JagacyException
- If an error occurs.public java.lang.String readPosition(java.lang.String propertyPrefix) throws JagacyException
<propertyPrefix>.row
<propertyPrefix>.column
<propertyPrefix>.length
propertyPrefix
- Prefix used to lookup properties.
JagacyException
- If an error occurs.public Key writeKey(Key key) throws JagacyException
key
- Key to write.
JagacyException
- If an error occurs.public Key writeKey(java.lang.String keyProperty) throws JagacyException
keyProperty
- Property to lookup.
JagacyException
- If an error occurs.public boolean waitForChange(int timeout) throws JagacyException
timeout
- Amount of time to wait (in milliseconds).
JagacyException
- If an error occurs.public boolean waitForChange(java.lang.String timeoutProperty) throws JagacyException
timeoutProperty
- Property to lookup (if property ends with
'.seconds', value will be converted to milliseconds).
JagacyException
- If an error occurs.public boolean waitForUnlock(int timeout) throws JagacyException
timeout
- Amount of time to wait (in milliseconds).
JagacyException
- If an error occurs.public boolean waitForUnlock(java.lang.String timeoutProperty) throws JagacyException
timeoutProperty
- Property to lookup (if property ends with
'.seconds', value will be converted to milliseconds).
JagacyException
- If an error occurs.public long readAlarmCount() throws JagacyException
JagacyException
- If an error occurs.public boolean waitForPosition(int row, int column, java.lang.String value, int timeout) throws JagacyException
row
- Row (indexed from 0).column
- Column (indexed from 0).value
- Value to appear.timeout
- Amount of time to wait (in milliseconds).
JagacyException
- If an error occurs.public boolean waitForPosition(Location location, java.lang.String value, int timeout) throws JagacyException
location
- The location of the value.value
- Value to appear.timeout
- Amount of time to wait (in milliseconds).
JagacyException
- If an error occurs.public boolean waitForPosition(java.lang.String propertyPrefix, java.lang.String timeoutProperty) throws JagacyException
<propertyPrefix>.row
<propertyPrefix>.column
<propertyPrefix>.value
propertyPrefix
- Prefix used to lookup properties.timeoutProperty
- Property to lookup (if property ends with
'.seconds', value will be converted to milliseconds).
JagacyException
- If an error occurs.public boolean waitForPosition(java.lang.String propertyPrefix, int timeout) throws JagacyException
<propertyPrefix>.row
<propertyPrefix>.column
<propertyPrefix>.value
propertyPrefix
- Prefix used to lookup properties.timeout
- Amount of time to wait (in milliseconds).
JagacyException
- If an error occurs.public boolean waitForPosition(java.lang.String propertyPrefix, java.lang.String value, java.lang.String timeoutProperty) throws JagacyException
<propertyPrefix>.row
<propertyPrefix>.column
propertyPrefix
- Prefix used to lookup properties.value
- Value to appear.timeoutProperty
- Property to lookup (if property ends with
'.seconds', value will be converted to milliseconds).
JagacyException
- If an error occurs.public boolean waitForPosition(java.lang.String propertyPrefix, java.lang.String value, int timeout) throws JagacyException
<propertyPrefix>.row
<propertyPrefix>.column
propertyPrefix
- Prefix used to lookup properties.value
- Value to appear.timeout
- Amount of time to wait (in milliseconds).
JagacyException
- If an error occurs.public int getWidth()
public int getHeight()
public int[] readCursor() throws JagacyException
readCursorLocation()
JagacyException
- If an error occurs.public Location readCursorLocation() throws JagacyException
JagacyException
- If an error occurs.public void writeCursor(int row, int column) throws JagacyException
row
- Row (indexed from 0).column
- Column (indexed from 0).
JagacyException
- If an error occurs.public void writeCursor(Location location) throws JagacyException
location
- The location at which to write the cursor.
JagacyException
- If an error occurs.public void writeCursor(java.lang.String propertyPrefix) throws JagacyException
<propertyPrefix>.row
<propertyPrefix>.column
propertyPrefix
- Prefix used to lookup properties.
JagacyException
- If an error occurs.public int getAttributeForPosition(int row, int column) throws JagacyException
row
- Row (indexed from 0).column
- Column (indexed from 0).
JagacyException
- If an error occurs.Field.getAttribute()
protected void logoff() throws JagacyException
JagacyException
- If an error occurs.public void close() throws JagacyException
JagacyException
- If an error occurs.public void abort()
protected void finalize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |