# JConnection (jremote API)

Read Time: 5 minute(s)

# Interface JConnection

All Known Subinterfaces:JXAConnection

All Known Implementing Classes:JConnectionImpl, WrappedJConnection


public interface JConnection
1

The connection to a remote jBASE instance.

# Field Summary

Modifier and Type Field and Description
static Charset DEFAULT_CHARSET
static String JBASE_DEFAULT_ENCODING

# Method Summary

Modifier and Type Method and Description
void begin()
Begin a jBASE transaction.
JSubroutineParameters call(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(String command)
Execute a jBASE command.
JExecuteResults execute(String command, JSelectList selectList)
Execute a jBASE command using an existing select list as a filter.
Charset getCharset()
Get the Charset for this connection.
JDynArray getCommon(String name)
Return the value of the named common with the supplied name.
EISMetaDataRepository getMetaData()
Return meta data of the connected jBASE instance.
String iconv(String data, String conversion)
Converts data in external format to internal format.
String monitoring(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(String str)
String oconv(String data, String conversion)
Converts internal representations of data to their external form.
JFile open(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(Writer writer)
boolean switchAccount(String user, String account, String password)
Log into the specified jBASE account.
int time()
Return the jBASE internal time.

# Field Detail

# JBASE_DEFAULT_ENCODING

static final String JBASE_DEFAULT_ENCODING
1

# DEFAULT_CHARSET

static final Charset DEFAULT_CHARSET
1

# Method Detail

# setTerminalOutputWriter

void setTerminalOutputWriter(Writer writer)
1

# newJDynArray

JDynArray newJDynArray()
1

Create a JDynArray with the correct Charset for this connection.

# newJDynArray

JDynArray newJDynArray(String str)
1

# getCharset

Charset getCharset()
1

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.

# switchAccount

boolean switchAccount(String user,
                      String account,
                      String password)
               throws JRemoteException
1
2
3
4

Log into the specified jBASE account. Parameters:user - username that belongs to the accountaccount - name of the account to log intopassword - password of the account to log into
Returns:boolean
Throws:JRemoteException

# close

void close()
    throws JRemoteException
1
2

Close any resources used by this connection. Throws:JRemoteException

# open

JFile open(String fileName)
    throws JRemoteException
1
2

Attempts to open a jBASE file or returns null if the file does not exist.

Parameters:fileName Returns:JFile
Throws:JRemoteException

# call

JSubroutineParameters call(String subroutineName,
                           JSubroutineParameters parameters)
                    throws JSubroutineNotFoundException,
                           JRemoteException
1
2
3
4

Call a jBASE subroutine. Parameters:subroutineName -parameters
Returns:the result parameters from subroutine call
Throws:JSubroutineNotFoundException``JRemoteException

# execute

JExecuteResults execute(String command)
                 throws JRemoteException
1
2

Execute a jBASE command. Parameters:command
Returns:the execute results
Throws:JRemoteException

# execute

JExecuteResults execute(String command,
                        JSelectList selectList)
                 throws JRemoteException
1
2
3

Execute a jBASE command using an existing select list as a filter. Parameters:command -selectList
Returns:the execute results
Throws:JRemoteException

# begin

void begin()
    throws JRemoteException
1
2

Begin a jBASE transaction.

If a transaction already exists then no action will be taken. Throws:JRemoteException
See Also:commit(), rollback()

# commit

void commit()
     throws JRemoteException
1
2

Commit all pending jBASE operations performed in transaction and mark as complete.

If no transaction exists then no action will be taken. Throws:JRemoteException
See Also:begin()

# rollback

void rollback()
       throws JRemoteException
1
2

Rollback all jBASE operations performed in transaction and mark as complete.

If no transaction exists then no action will be taken. Throws:JRemoteExceptionSee Also:begin()

# date

int date()
  throws JRemoteException
1
2

Return the jBASE internal date. Epoch Dec 31, 1967. Returns:int internal dateThrows:JRemoteException

# time

int time()
  throws JRemoteException
1
2

Return the jBASE internal time. Seconds since midnight. Returns:int internal time
Throws:JRemoteException

# getCommon

JDynArray getCommon(String name)
             throws JRemoteException
1
2

Return the value of the named common with the supplied name. Parameters:name
Returns:JDynArray value
Throws:JRemoteException

# getMetaData

EISMetaDataRepository getMetaData()
                           throws JRemoteException
1
2

Return meta data of the connected jBASE instance. Returns:EISMetaDataRepository meta data repositoryThrows:JRemoteException

# iconv

String iconv(String data,
             String conversion)
      throws JRemoteException
1
2
3

Converts data in external format to internal format. Parameters:data - data to be convertedconversion - the conversion command
Returns:String the converted data
Throws:JRemoteException

# oconv

String oconv(String data,
             String conversion)
      throws JRemoteException
1
2
3

Converts internal representations of data to their external form. Parameters:data - data to be convertedconversion - the conversion command
Returns:String the converted data
Throws:JRemoteException

# createStatement

JStatement createStatement()
                    throws JRemoteException
1
2

Create a statement object that enables queries to be executed and a JResultSet returned. Returns:JStatement jBase statement object
Throws:JRemoteException

# createSelectList

JSelectList createSelectList(JDynArray jd)
                      throws JRemoteException
1
2

Create a select list object from an existing dynamic array containing a list of keys separated by attribute markers. Parameters:jd - dynamic array containing the keys
Returns:JSelectList select list
Throws:JRemoteException

# echo

boolean echo(int length)
      throws JRemoteException
1
2

Sends an echo and waits for it's response Parameters:length - of echo packet to send.
Returns:True = success
Throws:JRemoteException - if echo fails

# monitoring

String monitoring(String command)
           throws JRemoteException
1
2

Sends an monitoring command and waits for it's response Parameters:command - to send
Returns:respose string
Throws:JRemoteException - if monitoring command fails

Back to jRemote API