public class LispConnector
extends java.lang.Object
One way to use this class is to modify the parameters as needed, and then call the go() method.
Another is to create a sub-class with method that modifies the values in this class and then calls the go() method in this class.
There are four ways for Lisp and Java to establish a connection:
Field | A | B | C | D |
---|---|---|---|---|
lispAdvertises |
true | true |
false | false |
advertInFile |
false | true |
false | true |
lispFile |
--- | used | --- | --- |
lispHost |
used | --- | --- | --- |
lispPort |
used | --- | --- | --- |
javaFile |
--- | --- | --- | used |
javaHost |
used | used | --- | used |
javaPort |
used | used | used | used |
pollInterval |
used | used | --- | --- |
pollCount |
used | used | --- | --- |
javaTimeout |
--- | --- | used | used |
Modifier and Type | Field and Description |
---|---|
static boolean |
advertInFile
Deprecated.
Who advertises and who connects.
|
static boolean |
debug
Deprecated.
Debug flag.
|
static java.lang.String |
javaFile
Deprecated.
The file where Java advertises a connection.
|
static java.lang.String |
javaHost
Deprecated.
The host where the Java application is running.
|
static int |
javaPort
Deprecated.
A port number.
|
static int |
javaTimeout
Deprecated.
How long should Java advertise.
|
static boolean |
lispAdvertises
Deprecated.
The value of this field determines who advertises and who connects
to the advertised connection.
|
static java.lang.String |
lispFile
Deprecated.
The file where Lisp advertises a connection.
|
static java.lang.String |
lispHost
Deprecated.
The host where Lisp expects a connection.
|
static int |
lispPort
Deprecated.
The port where Lisp expects a connection.
|
static int |
pollCount
Deprecated.
How many times to attempt making a connection.
|
static int |
pollInterval
Deprecated.
How often to attempt making a connection.
|
Constructor and Description |
---|
LispConnector()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
go()
Deprecated.
Connect to a Lisp process.
|
static boolean |
go(boolean ver)
Deprecated.
Connect to a Lisp process.
|
static boolean |
go(boolean ver,
java.lang.String[] throwErr)
Deprecated.
Connect to a Lisp process.
|
public static boolean lispAdvertises
If the value is true (the initial value), then Lisp advertises and the Java program connects to the advertised connection.
If the value is false, then Java must advertise and the Lisp program will connect.
public static boolean advertInFile
If the value is false (the initial value), then the host and port of the connection are known to the client application.
If the value is true, then the host and port of the connection are stored in a file visible to the client application.
public static java.lang.String lispFile
The value must be a string containing the path to the file.
The inital value is "", the empty string, which denotes the built-in default file "JavaToLisp.trp".
public static java.lang.String lispHost
The value must be a string containing a hostname.
The inital value is "", the empty string, which denotes the built-in default host "localhost".
public static int lispPort
The value must be a positive integer.
The initial value is 4321.
public static int pollInterval
The initial value is 1000.
A value of -1 specifies that only one attempt will be made.
public static int pollCount
public static int javaTimeout
The initial value is -1. This value denotes an indefinite time.
public static java.lang.String javaFile
The value must be a string containing the path to the file.
The inital value is "", the empty string, which denotes the built-in default file "LispToJava.trp".
public static java.lang.String javaHost
The inital value is "", the empty string, which denotes the built-in default host "localhost".
If Lisp advertises and Java connects, then this field is ignored.
If Java advertises at a pre-determined port, then this field is not used.
If Java advertises in a file, then this field must be set correctly to allow Lisp to complete the connection.
public static int javaPort
The initial value is 0 to allow the operating system to allocate a port number.
If Lisp advertises and Java connects, then this field is ignored.
If Java advertises at a pre-determined port, then this field must be set to that port number.
If Java advertises in a file, then this field may be set to 0.
public static boolean debug
When the value of this field is true, the jlinker methods print status messages to show the progress of a connection.
The initial value is false.
public static boolean go()
If the connection succeeds, the method returns true.
If the connection fails, the method throw an instance of IllegalArgumentException.
java.lang.IllegalArgumentException
- if the connection attempt fails.public static boolean go(boolean ver)
ver
- A boolean value that specifies whether the connection should be
verified.
If true, verify the connection with a rount-trip message.
If false, return as soon as the connection is made.
java.lang.IllegalArgumentException
- if the connection attempt fails.public static boolean go(boolean ver, java.lang.String[] throwErr)
ver
- A boolean value that specifies whether the connection should be
verified.
If true, verify the connection with a round-trip message.
If false, return as soon as the connection is made.
throwErr
- If this parameter is null, throw an instance of
IllegalArgumentException if the attempt to connect fails.
If the parameter is an array of String with at least one element, then store an error message in throwErr[0].