jremote jbase5.2.1

com.jbase.jremote
Interface JConnection

All Known Subinterfaces:
JXAConnection
All Known Implementing Classes:
JConnectionImpl, WrappedJConnection

public interface JConnection

The connection to a remote jBASE instance.

Author:
aphethean

Field Summary
static Charset DEFAULT_CHARSET
           
static CharsetDecoder DEFAULT_DECODER
           
static CharsetEncoder DEFAULT_ENCODER
           
static String JBASE_DEFAULT_ENCODING
           
 
Method Summary
 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
See Also:
Constant Field Values

DEFAULT_CHARSET

static final Charset DEFAULT_CHARSET

DEFAULT_ENCODER

static final CharsetEncoder DEFAULT_ENCODER

DEFAULT_DECODER

static final CharsetDecoder DEFAULT_DECODER
Method Detail

setTerminalOutputWriter

void setTerminalOutputWriter(Writer writer)

newJDynArray

JDynArray newJDynArray()

Create a JDynArray with the correct Charset for this connection.


newJDynArray

JDynArray newJDynArray(String str)

getCharset

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.


switchAccount

boolean switchAccount(String user,
                      String account,
                      String password)
                      throws JRemoteException

Log into the specified jBASE account.

Parameters:
user - username that belongs to the account
account - name of the account to log into
password - password of the account to log into
Returns:
boolean
Throws:
JRemoteException

close

void close()
           throws JRemoteException

Close any resources used by this connection.

Throws:
JRemoteException

open

JFile open(String fileName)
           throws JRemoteException

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

Call a jBASE subroutine.

Parameters:
subroutineName -
parameters -
Returns:
the result parameters from subroutine call
Throws:
JSubroutineNotFoundException
JRemoteException

execute

JExecuteResults execute(String command)
                        throws JRemoteException

Execute a jBASE command.

Parameters:
command -
Returns:
the execute results
Throws:
JRemoteException

execute

JExecuteResults execute(String command,
                        JSelectList selectList)
                        throws JRemoteException

Execute a jBASE command using an existing select list as a filter.

Parameters:
command -
select - list
Returns:
the execute results
Throws:
JRemoteException

begin

void begin()
           throws JRemoteException

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

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

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

If no transaction exists then no action will be taken.

Throws:
JRemoteException
See Also:
begin()

date

int date()
         throws JRemoteException

Return the jBASE internal date. Epoch Dec 31, 1967.

Returns:
int internal date
Throws:
JRemoteException

time

int time()
         throws JRemoteException

Return the jBASE internal time. Seconds since midnight.

Returns:
int internal time
Throws:
JRemoteException

getCommon

JDynArray getCommon(String name)
                    throws JRemoteException

Return the value of the named common with the supplied name.

Parameters:
name -
Returns:
JDynArray value
Throws:
JRemoteException

getMetaData

EISMetaDataRepository getMetaData()
                                  throws JRemoteException

Return meta data of the connected jBASE instance.

Returns:
EISMetaDataRepository meta data repository
Throws:
JRemoteException

iconv

String iconv(String data,
             String conversion)
             throws JRemoteException

Converts data in external format to internal format.

Returns:
String data to be converted
Throws:
JRemoteException

oconv

String oconv(String data,
             String conversion)
             throws JRemoteException

Converts internal representations of data to their external form.

Returns:
String numeric data to be converted
Throws:
JRemoteException

createStatement

JStatement createStatement()
                           throws JRemoteException

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

Create a select list object from an existing dynamic array containing a list of keys separated by attribute markers.

Parameters:
JDynArray - dynamic array containing the keys
Returns:
JSelectList select list
Throws:
JRemoteException

echo

boolean echo(int length)
             throws JRemoteException

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

Sends an monitoring command and waits for it's response

Parameters:
command - to send
Returns:
respose string
Throws:
JRemoteException - if monitoring command fails

jremote jbase5.2.1

Copyright © 2016 TEMENOS. All Rights Reserved.