|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sas.net.connect.ConnectClient
This is the base class for TelnetConnectClient and TunneledConnectClient.
Field Summary | |
static Integer |
LINE_TYPE_BYLINE
Line type code for by LOG and LIST lines. |
static Integer |
LINE_TYPE_ERROR
Line type code for error LOG and LIST lines. |
static Integer |
LINE_TYPE_FOOTNOTE
Line type code for footnote LOG and LIST lines. |
static Integer |
LINE_TYPE_HILIGHTED
Line type code for highlighted LOG and LIST lines. |
static Integer |
LINE_TYPE_MESSAGE
Line type code for message LOG and LIST lines. |
static Integer |
LINE_TYPE_NORMAL
Line type code for normal LOG and LIST lines. |
static Integer |
LINE_TYPE_NOTE
Line type code for note LOG and LIST lines. |
static Integer |
LINE_TYPE_SOURCE
Line type code for program source code LOG and LIST lines. |
static Integer |
LINE_TYPE_TITLE
Line type code for title LOG and LIST lines. |
static Integer |
LINE_TYPE_WARNING
Line type code for warning LOG and LIST lines. |
Constructor Summary | |
ConnectClient()
Constructs a SAS/CONNECT driver for Java ConnectClient object. |
|
ConnectClient(Properties info)
Constructs a SAS/CONNECT driver for Java ConnectClient object. |
Method Summary | |
void |
clearEditLines()
Clears the edit lines. |
void |
clearListLines()
Clears output lines in the LIST file. |
void |
clearLogLines()
Clears the LOG lines in the internal LOG line buffer. |
void |
connect(String host,
int port)
Connects to the remote SAS session. |
void |
disconnect()
Disconnects and shuts down the remote SAS session. |
byte[] |
getDownloadData(String name)
Gets the contents of a downloaded file. |
String |
getDriverName()
Gets the name and version number of the SAS/CONNECT driver for Java component. |
String |
getEditLines()
Gets edit lines. |
int |
getListLineCount()
Get the number of lines in the internal LIST line buffer. |
String |
getListLines()
Gets the lines that SAS generated in the LIST file from the internal LIST line buffer as a single String. |
int |
getListLines(String[] lines,
Integer[] types)
Gets the lines that SAS generated in the LIST file from the internal LIST line buffer as an array of String with line types associated. |
int |
getLogLineCount()
Get the number of lines in the internal LOG line buffer. |
String |
getLogLines()
Gets the lines that SAS generated in the LOG file from the internal LOG line buffer as a single String. |
int |
getLogLines(String[] lines,
Integer[] types)
Gets the lines that SAS generated in the LOG file from the internal LOG line buffer as an array of String with line types associated. |
int |
getMajorSasVersion()
Gets the major release number of the remote SAS server. |
int |
getMinorSasVersion()
Gets the minor release number of the remote SAS server. |
Connection |
getSharenet()
Starts the Single User Server. |
String |
getTextTransportFormat()
Returns the name of the character encoding used to convert SAS programs to byte arrays before submitting them and to convert received byte arrays representing log and list lines to strings. |
boolean |
isConnected()
Gets the value of the connected property. |
void |
rcancel()
Cancels the statements that were sent to the remote SAS session. |
void |
rsubmit(String lines)
Submits SAS statements to the remote SAS session. |
void |
setLogException(boolean logException)
Sets the logException property. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Integer LINE_TYPE_NORMAL
public static final Integer LINE_TYPE_HILIGHTED
public static final Integer LINE_TYPE_SOURCE
public static final Integer LINE_TYPE_TITLE
public static final Integer LINE_TYPE_BYLINE
public static final Integer LINE_TYPE_FOOTNOTE
public static final Integer LINE_TYPE_ERROR
public static final Integer LINE_TYPE_WARNING
public static final Integer LINE_TYPE_NOTE
public static final Integer LINE_TYPE_MESSAGE
Constructor Detail |
public ConnectClient()
public ConnectClient(Properties info)
info
- java.util.Properties object which contains:
true
and false
. The default is
false
.
session
and none
.
session
means that all messages exchanged in a session will be
examined and compressed if the compression would yield a smaller message. This
is the default behavior. none
means that no messages will be
compressed. This behavior is useful in SAS/CONNECT sessions in which the time used
to compress and decompress data does not justify the amount of space saved by
compression. This may be the case when the data exchanged are primarily binary.
java.lang.String
objects and the byte
arrays
that are transmitted to and received from the server. If no value is
specified for this property, the default character conversion will
be used. When connecting to a SAS/CONNECT server of version 8.1 or later, this
information is determined automatically so the textTransportFormat
property
is ignored.
Method Detail |
public boolean isConnected()
public String getDriverName()
public int getMajorSasVersion() throws ConnectException
ConnectException
- if there is no
live connection to a SAS server.public int getMinorSasVersion() throws ConnectException
ConnectException
- if there is no
live connection to a SAS server.public void setLogException(boolean logException)
logException.
- If True, the ConnectClient will throw a ConnectLogException
when it detects a message in the SAS log indicating an error.public void connect(String host, int port) throws ConnectException
host
- Host name or address of the machine on which the remote SAS session is running.port
- TCP/IP port number on which the SAS session is listening.ConnectException
- if any exceptions are detected.public Connection getSharenet() throws ConnectException
ConnectException
- if the Single User Server could not be started, or
detected an error.public void rsubmit(String lines) throws ConnectException, ConnectLogException
lines
- The SAS statements that you want to submit.ConnectException
- if an error is detected.public void rcancel()
public void disconnect() throws ConnectException
ConnectException
- if an error is detected.public String getLogLines()
\n
".public int getLogLines(String[] lines, Integer[] types)
String
with line types associated. This
method copies
N lines from its buffer of LOG lines into lines
and copies the associated line type for each line into
types. N is the smallest of
lines.length
, types.length
, and
the size of the buffer of LOG lines. The size of the internal LOG
line buffer can be determined in advance by calling
getLogLineCount()
. Each line type is
one of the LINE_TYPE_* fields on this class.public int getLogLineCount()
public void clearLogLines()
public String getListLines()
\n
".public int getListLines(String[] lines, Integer[] types)
String
with line types associated. This
method copies
N lines from its buffer of LIST lines into lines
and copies the associated line type for each line into
types. N is the smallest of
lines.length
, types.length
, and
the size of the buffer of LIST lines. The size of the internal LIST
line buffer can be determined in advance by calling
getListLineCount()
. Each line type is
one of the LINE_TYPE_* fields on this class.public int getListLineCount()
public void clearListLines()
public String getEditLines()
public void clearEditLines()
public byte[] getDownloadData(String name) throws ConnectException
name
- The name of the downloaded file.ConnectException
- if an error is detected.public String getTextTransportFormat()
null
is returned,
then the default character encoding should be
used.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |