public abstract class AbstractJRemoteConnection
extends java.lang.Object
Abstract interface to a remote jBASE instance.
This abstract connection decouples the JRemoteConnection from the underlying physical connection. It performs services such as authentication in a connection independant way.
Constructor and Description |
---|
AbstractJRemoteConnection() |
Modifier and Type | Method and Description |
---|---|
void |
authenticate(java.lang.String user,
java.lang.String password)
Send data for authentication to the server.
|
void |
authenticate(java.lang.String user,
java.lang.String account,
java.lang.String password)
Send data for authentication to the server, the server must be configured to
authenticate jBASE account connections.
|
abstract void |
close() |
java.nio.charset.Charset |
getCharset() |
java.nio.charset.CharsetDecoder |
getCharsetDecoder() |
java.nio.charset.CharsetEncoder |
getCharsetEncoder() |
abstract Response |
receive() |
abstract void |
send(JRemoteRequest request) |
Response |
sendWaitForResponse(JRemoteRequest request)
Convenient method which simply calls #send followed by #receive.
|
void |
setCharset(java.nio.charset.Charset charset) |
void |
setProperties(java.util.Properties props) |
public abstract void send(JRemoteRequest request) throws JRemoteException
JRemoteException
public abstract Response receive() throws JRemoteException
JRemoteException
public abstract void close() throws JRemoteException
JRemoteException
public Response sendWaitForResponse(JRemoteRequest request) throws JRemoteException
request
- a request to the serverJRemoteException
public void authenticate(java.lang.String user, java.lang.String password) throws JRemoteException
Send data for authentication to the server. If the authentication fails the server will close the connection.
JRemoteException
public void authenticate(java.lang.String user, java.lang.String account, java.lang.String password) throws JRemoteException
Send data for authentication to the server, the server must be configured to authenticate jBASE account connections. If the authentication fails the server will close the connection.
JRemoteException
public void setProperties(java.util.Properties props) throws JRemoteException
JRemoteException
public java.nio.charset.Charset getCharset()
public java.nio.charset.CharsetEncoder getCharsetEncoder()
public java.nio.charset.CharsetDecoder getCharsetDecoder()
public void setCharset(java.nio.charset.Charset charset)