jremote jbase5.2.1

com.jbase.jremote.io
Class AbstractJRemoteConnection

java.lang.Object
  extended by com.jbase.jremote.io.AbstractJRemoteConnection
Direct Known Subclasses:
InterceptorConnection, JRemoteSocketConnection

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.

Author:
aphethean

Constructor Summary
AbstractJRemoteConnection()
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJRemoteConnection

public AbstractJRemoteConnection()
Method Detail

send

public abstract void send(JRemoteRequest request)
                   throws JRemoteException
Throws:
JRemoteException

receive

public abstract Response receive()
                          throws JRemoteException
Throws:
JRemoteException

close

public abstract void close()
                    throws JRemoteException
Throws:
JRemoteException

sendWaitForResponse

public Response sendWaitForResponse(JRemoteRequest request)
                             throws JRemoteException
Convenient method which simply calls #send followed by #receive.

Parameters:
request - a request to the server
Returns:
response from the server
Throws:
JRemoteException

authenticate

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.

Throws:
JRemoteException

authenticate

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.

Throws:
JRemoteException

setProperties

public void setProperties(java.util.Properties props)
                   throws JRemoteException
Throws:
JRemoteException

getCharset

public java.nio.charset.Charset getCharset()

getCharsetEncoder

public java.nio.charset.CharsetEncoder getCharsetEncoder()

getCharsetDecoder

public java.nio.charset.CharsetDecoder getCharsetDecoder()

setCharset

public void setCharset(java.nio.charset.Charset charset)

jremote jbase5.2.1

Copyright © 2010 TEMENOS. All Rights Reserved.