|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jagacy.AbstractSession
com.jagacy.Session3270
Supports a TN3270 screen-scraping session.
| Constructor Summary | |
Session3270(java.lang.String name)
Creates a new session. |
|
Session3270(java.lang.String name,
java.lang.String host)
Creates a new session. |
|
Session3270(java.lang.String name,
java.lang.String host,
int port)
Creates a new session. |
|
Session3270(java.lang.String name,
java.lang.String host,
int port,
java.lang.String terminal)
Creates a new session. |
|
Session3270(java.lang.String name,
java.lang.String host,
java.lang.String terminal)
Creates a new session. |
|
| Method Summary | |
protected UserInterface |
createUi()
Creates a user interface. |
int |
getPositionField(int position,
int[] offset,
int[] length)
Used internally. |
void |
open(java.lang.String deviceName)
Opens the session. |
java.lang.String |
readField(int field,
int offset,
int length)
Reads a string at the given field and offset. |
java.lang.String |
readField(java.lang.String propertyPrefix)
Reads a string at the given field and offset. |
int |
readFieldLength(int field)
Returns the length of a field. |
int |
readFieldLength(java.lang.String fieldProperty)
Returns the length of a field. |
Field[] |
readFields()
Returns an array of all the fields on the screen. |
boolean |
waitForField(int field,
int offset,
java.lang.String value,
int timeout)
Waits (in 100 millisecond intervals) for the value to appear at the given field and offset. |
boolean |
waitForField(java.lang.String propertyPrefix,
int timeout)
Waits (in 100 millisecond intervals) for the value to appear at the given field and offset. |
boolean |
waitForField(java.lang.String propertyPrefix,
java.lang.String timeoutProperty)
Waits (in 100 millisecond intervals) for the value to appear at the given field and offset. |
boolean |
waitForField(java.lang.String propertyPrefix,
java.lang.String value,
int timeout)
Waits (in 100 millisecond intervals) for the value to appear at the given field and offset. |
boolean |
waitForField(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 field and offset. |
void |
writeField(int field,
int offset,
java.lang.String value)
Writes a string at the given field and offset. |
void |
writeField(java.lang.String propertyPrefix)
Writes a string at the field and offset given by the properties. |
void |
writeField(java.lang.String propertyPrefix,
java.lang.String value)
Writes a string at the field and offset given by the properties. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Session3270(java.lang.String name)
throws JagacyException
name - The session name (also the name of the .properties file).
JagacyException - If an error occurs.
public Session3270(java.lang.String name,
java.lang.String host)
throws JagacyException
name - The session name (also the name of the .properties file).host - The session's host.
JagacyException - If an error occurs.
public Session3270(java.lang.String name,
java.lang.String host,
int port,
java.lang.String terminal)
throws JagacyException
name - The session name (also the name of the .properties file).host - The session's host.port - The session's port number.terminal - The session's terminal type.
JagacyException - If an error occurs.
public Session3270(java.lang.String name,
java.lang.String host,
java.lang.String terminal)
throws JagacyException
name - The session name (also the name of the .properties file).host - The session's host.terminal - The session's terminal type.
JagacyException - If an error occurs.
public Session3270(java.lang.String name,
java.lang.String host,
int port)
throws JagacyException
name - The session name (also the name of the .properties file).host - The session's host.port - The session's port number.
JagacyException - If an error occurs.| Method Detail |
protected UserInterface createUi()
throws JagacyException
AbstractSession
createUi in class AbstractSessionJagacyException - If an error occurs.
public void open(java.lang.String deviceName)
throws JagacyException
deviceName - The session's device name.
JagacyException - If an error occurs.
public void writeField(int field,
int offset,
java.lang.String value)
throws JagacyException
field - Field (indexed from 1).offset - Offset in the field (indexed from 1).value - String to write.
JagacyException - If an error occurs.
public void writeField(java.lang.String propertyPrefix)
throws JagacyException
<propertyPrefix>.field
<propertyPrefix>.offset
<propertyPrefix>.value
propertyPrefix - Prefix used to lookup properties.
JagacyException - If an error occurs.
public void writeField(java.lang.String propertyPrefix,
java.lang.String value)
throws JagacyException
<propertyPrefix>.field
<propertyPrefix>.offset
propertyPrefix - Prefix used to lookup properties.value - String to write.
JagacyException - If an error occurs.
public Field[] readFields()
throws JagacyException
JagacyException - If an error occurs.Field
public java.lang.String readField(int field,
int offset,
int length)
throws JagacyException
field - Field (indexed from 1).offset - Offset (indexed from 1).length - Length of string to read.
JagacyException - If an error occurs.
public java.lang.String readField(java.lang.String propertyPrefix)
throws JagacyException
<propertyPrefix>.field
<propertyPrefix>.offset
<propertyPrefix>.length
propertyPrefix - Prefix used to lookup properties.
JagacyException - If an error occurs.
public int readFieldLength(int field)
throws JagacyException
field - Field (indexed from 1).
JagacyException - If an error occurs.
public int readFieldLength(java.lang.String fieldProperty)
throws JagacyException
fieldProperty - Property to lookup.
JagacyException - If an error occurs.
public boolean waitForField(int field,
int offset,
java.lang.String value,
int timeout)
throws JagacyException
field - Field (indexed from 1).offset - Offset (indexed from 1).value - Value to appear.timeout - Amount of time to wait (in milliseconds).
JagacyException - If an error occurs.
public boolean waitForField(java.lang.String propertyPrefix,
java.lang.String timeoutProperty)
throws JagacyException
<propertyPrefix>.field
<propertyPrefix>.offset
<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 waitForField(java.lang.String propertyPrefix,
int timeout)
throws JagacyException
<propertyPrefix>.field
<propertyPrefix>.offset
<propertyPrefix>.value
propertyPrefix - Prefix used to lookup properties.timeout - Amount of time to wait (in milliseconds).
JagacyException - If an error occurs.
public boolean waitForField(java.lang.String propertyPrefix,
java.lang.String value,
java.lang.String timeoutProperty)
throws JagacyException
<propertyPrefix>.field
<propertyPrefix>.offset
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 waitForField(java.lang.String propertyPrefix,
java.lang.String value,
int timeout)
throws JagacyException
<propertyPrefix>.field
<propertyPrefix>.offset
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 getPositionField(int position,
int[] offset,
int[] length)
throws JagacyException
position - Position to find.offset - Offset within field.length - Length of field.
JagacyException - If an error occurs.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||