|
jremote jbase5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jbase.jremote.io.JConnectionImpl
public class JConnectionImpl
The connection to a remote jBASE instance implemented using a IO messages over an abstract connection.
Field Summary |
---|
Fields inherited from interface com.jbase.jremote.JConnection |
---|
DEFAULT_CHARSET, DEFAULT_DECODER, DEFAULT_ENCODER, JBASE_DEFAULT_ENCODING |
Fields inherited from interface javax.transaction.xa.XAResource |
---|
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
Constructor Summary | |
---|---|
JConnectionImpl()
|
|
JConnectionImpl(AbstractJRemoteConnection connection)
|
|
JConnectionImpl(AbstractJRemoteConnection connection,
Properties cxProps)
|
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. |
void |
commit(Xid xid,
boolean onePhase)
|
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)
Send an echo request and waits for a reply. |
void |
end(Xid xid,
int flags)
|
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. |
void |
forget(Xid xid)
|
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. |
int |
getTransactionTimeout()
|
String |
iconv(String data,
String conversion)
Converts data in external format to internal format. |
protected void |
init(AbstractJRemoteConnection connection,
boolean allowInput,
Properties cxProps)
|
boolean |
isSameRM(XAResource res)
|
String |
monitoring(String command)
Send an monitoring request and waits for a reply. |
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. |
int |
prepare(Xid xid)
|
Xid[] |
recover(int flag)
|
void |
rollback()
Rollback all jBASE operations performed in transaction and mark as complete. |
void |
rollback(Xid xid)
|
Response |
sendWaitForResponse(JRemoteRequest req)
Uses underlying connection to send a request and wait for the response. |
void |
setOutputStream(OutputStream out)
|
void |
setTerminalOutputWriter(Writer writer)
|
boolean |
setTransactionTimeout(int timeout)
|
void |
start(Xid xid,
int flags)
|
boolean |
switchAccount(String user,
String account,
String password)
Log into the specified jBASE account. |
int |
time()
Return the jBASE internal time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JConnectionImpl()
public JConnectionImpl(AbstractJRemoteConnection connection)
public JConnectionImpl(AbstractJRemoteConnection connection, Properties cxProps)
Method Detail |
---|
protected void init(AbstractJRemoteConnection connection, boolean allowInput, Properties cxProps)
public void setOutputStream(OutputStream out)
public void setTerminalOutputWriter(Writer writer)
setTerminalOutputWriter
in interface JConnection
JConnection.setTerminalOutputWriter(java.io.Writer)
public JDynArray newJDynArray()
JConnection
Create a JDynArray with the correct Charset for this connection.
newJDynArray
in interface JConnection
public JDynArray newJDynArray(String str)
newJDynArray
in interface JConnection
public Charset getCharset()
JConnection
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.
getCharset
in interface JConnection
public boolean switchAccount(String user, String account, String password) throws JRemoteException
JConnection
Log into the specified jBASE account.
switchAccount
in interface JConnection
user
- username that belongs to the accountaccount
- name of the account to log intopassword
- password of the account to log into
JRemoteException
JConnection.switchAccount(java.lang.String user, java.lang.String account, java.lang.String password)
public void close() throws JRemoteException
JConnection
Close any resources used by this connection.
close
in interface JConnection
JRemoteException
JConnection.close()
public JFile open(String fileName) throws JRemoteException
JConnection
Attempts to open a jBASE file or returns null if the file does not exist.
open
in interface JConnection
JRemoteException
JConnection.open(java.lang.String fileName)
public JSubroutineParameters call(String subroutineName, JSubroutineParameters parameters) throws JSubroutineNotFoundException, JRemoteException
JConnection
Call a jBASE subroutine.
call
in interface JConnection
JSubroutineNotFoundException
JRemoteException
JConnection.call(java.lang.String, com.jbase.jremote.JSubroutineParameters)
public JExecuteResults execute(String command) throws JRemoteException
JConnection
Execute a jBASE command.
execute
in interface JConnection
JRemoteException
JConnection.execute(java.lang.String)
public JExecuteResults execute(String command, JSelectList selectList) throws JRemoteException
JConnection
Execute a jBASE command using an existing select list as a filter.
execute
in interface JConnection
JRemoteException
JConnection.execute(java.lang.String, com.jbase.jremote.JSelectList)
public void begin() throws JRemoteException
JConnection
Begin a jBASE transaction.
If a transaction already exists then no action will be taken.
begin
in interface JConnection
JRemoteException
JConnection.begin()
public void commit() throws JRemoteException
JConnection
Commit all pending jBASE operations performed in transaction and mark as complete.
If no transaction exists then no action will be taken.
commit
in interface JConnection
JRemoteException
JConnection.commit()
public void rollback() throws JRemoteException
JConnection
Rollback all jBASE operations performed in transaction and mark as complete.
If no transaction exists then no action will be taken.
rollback
in interface JConnection
JRemoteException
JConnection.rollback()
public int date() throws JRemoteException
Return the jBASE internal date. Epoch Dec 31, 1967.
date
in interface JConnection
JRemoteException
public int time() throws JRemoteException
Return the jBASE internal time. Seconds since midnight.
time
in interface JConnection
JRemoteException
public JDynArray getCommon(String name) throws JRemoteException
Return the value of the named common with the supplied name.
getCommon
in interface JConnection
name
-
JRemoteException
public EISMetaDataRepository getMetaData() throws JRemoteException
JConnection
Return meta data of the connected jBASE instance.
getMetaData
in interface JConnection
JRemoteException
JConnection.getMetaData()
public String iconv(String data, String conversion) throws JRemoteException
JConnection
Converts data in external format to internal format.
iconv
in interface JConnection
JRemoteException
com.jbase.jremote.JConnection#iconv()
public String oconv(String data, String conversion) throws JRemoteException
JConnection
Converts internal representations of data to their external form.
oconv
in interface JConnection
JRemoteException
com.jbase.jremote.JConnection#oconv()
public JStatement createStatement() throws JRemoteException
JConnection
Create a statement object that enables queries to be executed and a JResultSet returned.
createStatement
in interface JConnection
JRemoteException
JConnection.createStatement()
public JSelectList createSelectList(JDynArray jd) throws JRemoteException
JConnection
Create a select list object from an existing dynamic array containing a list of keys separated by attribute markers.
createSelectList
in interface JConnection
JRemoteException
com.jbase.jremote.JConnection#createSelectList()
public int prepare(Xid xid) throws XAException
prepare
in interface XAResource
XAException
public void commit(Xid xid, boolean onePhase) throws XAException
commit
in interface XAResource
XAException
public void rollback(Xid xid) throws XAException
rollback
in interface XAResource
XAException
public void start(Xid xid, int flags) throws XAException
start
in interface XAResource
XAException
public void end(Xid xid, int flags) throws XAException
end
in interface XAResource
XAException
public void forget(Xid xid) throws XAException
forget
in interface XAResource
XAException
public boolean isSameRM(XAResource res) throws XAException
isSameRM
in interface XAResource
XAException
public Xid[] recover(int flag) throws XAException
recover
in interface XAResource
XAException
public int getTransactionTimeout() throws XAException
getTransactionTimeout
in interface XAResource
XAException
public boolean setTransactionTimeout(int timeout) throws XAException
setTransactionTimeout
in interface XAResource
XAException
public Response sendWaitForResponse(JRemoteRequest req) throws Exception
Exception
public boolean echo(int length) throws JRemoteException
Send an echo request and waits for a reply.
echo
in interface JConnection
JRemoteException
public String monitoring(String command) throws JRemoteException
Send an monitoring request and waits for a reply.
monitoring
in interface JConnection
command
- to send
JRemoteException
|
jremote jbase5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |