public interface JConnection
The connection to a remote jBASE instance.
Modifier and Type | Field and Description |
---|---|
static java.nio.charset.Charset |
DEFAULT_CHARSET |
static java.lang.String |
JBASE_DEFAULT_ENCODING |
Modifier and Type | Method and Description |
---|---|
void |
begin()
Begin a jBASE transaction.
|
JSubroutineParameters |
call(java.lang.String subroutineName,
JSubroutineParameters parameters)
Call a jBASE subroutine.
|
void |
close()
Close any resources used by this connection.
|
void |
commit()
Commit all pending jBASE operations performed in transaction
and mark as complete.
|
JSelectList |
createSelectList(JDynArray jd)
Create a select list object from an existing dynamic array
containing a list of keys separated by attribute markers.
|
JStatement |
createStatement()
Create a statement object that enables queries to be executed and
a JResultSet returned.
|
int |
date()
Return the jBASE internal date.
|
boolean |
echo(int length)
Sends an echo and waits for it's response
|
JExecuteResults |
execute(java.lang.String command)
Execute a jBASE command.
|
JExecuteResults |
execute(java.lang.String command,
JSelectList selectList)
Execute a jBASE command using an existing select list as a filter.
|
JDynArray |
func(java.lang.String function_name)
Call a jBASE function.
|
JDynArray |
func(java.lang.String function_name,
JSubroutineParameters parameters) |
java.nio.charset.Charset |
getCharset()
Get the Charset for this connection.
|
JDynArray |
getCommon(java.lang.String name)
Return the value of the named common with the supplied name.
|
EISMetaDataRepository |
getMetaData()
Return meta data of the connected jBASE instance.
|
java.lang.String |
iconv(java.lang.String data,
java.lang.String conversion)
Converts data in external format to internal format.
|
java.lang.String |
monitoring(java.lang.String command)
Sends an monitoring command and waits for it's response
|
JDynArray |
newJDynArray()
Create a JDynArray with the correct Charset for this connection.
|
JDynArray |
newJDynArray(java.lang.String str) |
java.lang.String |
oconv(java.lang.String data,
java.lang.String conversion)
Converts internal representations of data to their external form.
|
JFile |
open(java.lang.String fileName)
Attempts to open a jBASE file or returns null if the file does
not exist.
|
void |
rollback()
Rollback all jBASE operations performed in transaction
and mark as complete.
|
void |
setTerminalOutputWriter(java.io.Writer writer) |
boolean |
switchAccount(java.lang.String user,
java.lang.String account,
java.lang.String password)
Log into the specified jBASE account.
|
int |
time()
Return the jBASE internal time.
|
static final java.lang.String JBASE_DEFAULT_ENCODING
static final java.nio.charset.Charset DEFAULT_CHARSET
void setTerminalOutputWriter(java.io.Writer writer)
JDynArray newJDynArray()
Create a JDynArray with the correct Charset for this connection.
JDynArray newJDynArray(java.lang.String str)
java.nio.charset.Charset getCharset()
Get the Charset for this connection. This is used on String operations to convert the bytes received from jBASE to a Java UTF-16 String.
boolean switchAccount(java.lang.String user, java.lang.String account, java.lang.String password) throws JRemoteException
Log into the specified jBASE account.
user
- username that belongs to the accountaccount
- name of the account to log intopassword
- password of the account to log intoJRemoteException
void close() throws JRemoteException
Close any resources used by this connection.
JRemoteException
JFile open(java.lang.String fileName) throws JRemoteException
Attempts to open a jBASE file or returns null if the file does not exist.
fileName
- JRemoteException
JSubroutineParameters call(java.lang.String subroutineName, JSubroutineParameters parameters) throws JSubroutineNotFoundException, JRemoteException
Call a jBASE subroutine.
subroutineName
- parameters
- JSubroutineNotFoundException
JRemoteException
JDynArray func(java.lang.String function_name) throws JSubroutineNotFoundException, JRemoteException
Call a jBASE function.
function_name
- parameters
- JSubroutineNotFoundException
JRemoteException
JDynArray func(java.lang.String function_name, JSubroutineParameters parameters) throws JSubroutineNotFoundException, JRemoteException
JExecuteResults execute(java.lang.String command) throws JRemoteException
Execute a jBASE command.
command
- JRemoteException
JExecuteResults execute(java.lang.String command, JSelectList selectList) throws JRemoteException
Execute a jBASE command using an existing select list as a filter.
command
- selectList
- JRemoteException
void begin() throws JRemoteException
Begin a jBASE transaction.
If a transaction already exists then no action will be taken.
JRemoteException
commit()
,
rollback()
void commit() throws JRemoteException
Commit all pending jBASE operations performed in transaction and mark as complete.
If no transaction exists then no action will be taken.
JRemoteException
begin()
void rollback() throws JRemoteException
Rollback all jBASE operations performed in transaction and mark as complete.
If no transaction exists then no action will be taken.
JRemoteException
begin()
int date() throws JRemoteException
Return the jBASE internal date. Epoch Dec 31, 1967.
JRemoteException
int time() throws JRemoteException
Return the jBASE internal time. Seconds since midnight.
JRemoteException
JDynArray getCommon(java.lang.String name) throws JRemoteException
Return the value of the named common with the supplied name.
name
- JRemoteException
EISMetaDataRepository getMetaData() throws JRemoteException
Return meta data of the connected jBASE instance.
JRemoteException
java.lang.String iconv(java.lang.String data, java.lang.String conversion) throws JRemoteException
Converts data in external format to internal format.
data
- data to be convertedconversion
- the conversion commandJRemoteException
java.lang.String oconv(java.lang.String data, java.lang.String conversion) throws JRemoteException
Converts internal representations of data to their external form.
data
- data to be convertedconversion
- the conversion commandJRemoteException
JStatement createStatement() throws JRemoteException
Create a statement object that enables queries to be executed and a JResultSet returned.
JRemoteException
JSelectList createSelectList(JDynArray jd) throws JRemoteException
Create a select list object from an existing dynamic array containing a list of keys separated by attribute markers.
jd
- dynamic array containing the keysJRemoteException
boolean echo(int length) throws JRemoteException
Sends an echo and waits for it's response
length
- of echo packet to send.JRemoteException
- if echo failsjava.lang.String monitoring(java.lang.String command) throws JRemoteException
Sends an monitoring command and waits for it's response
command
- to sendJRemoteException
- if monitoring command fails