ibilling.client
Class RMISessionConnection

java.lang.Object
  extended by ibilling.client.RMISessionConnection
All Implemented Interfaces:
SessionConnection

public class RMISessionConnection
extends java.lang.Object
implements SessionConnection

RMI based implementation of SessionConnection. Can also be used in non-RMI mode (locally).

Since:
1.0

Field Summary
private  java.util.Map<java.lang.String,java.lang.Object> config
          configuration map
private  java.lang.Integer merchantAccountCode
          merchant account code.
private  java.lang.String password
          password.
private  ibilling.gates.RMIGates rmiGates
          Reference to remote bean
private  ibilling.gates.RMIGatesLocal rmiGatesLocal
          Reference to local bean
 
Fields inherited from interface ibilling.client.SessionConnection
CLIENT_EMAIL_DOMAIN, CLIENT_EMAIL_ENCODED, CLIENT_IP_ADDRESS, CLIENT_PASSWORD_ENCODED, CLIENT_USER_NAME_ENCODED, CONNECTION_TYPE, DEBUG, FIND_ACCOUNT_TRANSACTION, FIND_CUSTOMER_ACCOUNT, FIND_PAYMENT_OPTION, FIND_PAYMENT_PLAN, KEYSTORE_PASSWORD, KEYSTORE_PATH, LOAD_OBJECT, PAYMENT_OPTION_VERIFICATION_AMOUNT, PROCESSOR_HOST
 
Constructor Summary
RMISessionConnection()
           
 
Method Summary
 java.util.List<ClientObject> find(SessionContext sessionContext, java.lang.String queryName, java.util.Map<java.lang.String,java.lang.Object> parameters)
          Communicates find message to server
private  java.lang.reflect.Field[] getFields(java.lang.Class clazz)
           
private  boolean isUpdatedField(java.lang.String className)
           
 void login(java.lang.Integer merchantAccountCode, java.lang.String password, java.util.Map<java.lang.String,java.lang.Object> config)
          Communicates login message to the server
 void logout()
          Communicates logout message to the server for a single CustomerAccount
 void save(SessionContext sessionContext, java.util.List<CustomerAccount> customerAccounts)
          Communicates save message to the server for a list of CustomerAccounts
private  void synchronizeClientObject(SessionContext sessionContext, ClientObject clientObject)
           
private  void synchronizeWithSessionContext(SessionContext sessionContext, java.util.List<CustomerAccount> customerAccountList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

merchantAccountCode

private java.lang.Integer merchantAccountCode
merchant account code.


password

private java.lang.String password
password.


rmiGates

private ibilling.gates.RMIGates rmiGates
Reference to remote bean


rmiGatesLocal

private ibilling.gates.RMIGatesLocal rmiGatesLocal
Reference to local bean


config

private java.util.Map<java.lang.String,java.lang.Object> config
configuration map

Constructor Detail

RMISessionConnection

public RMISessionConnection()
Method Detail

login

public void login(java.lang.Integer merchantAccountCode,
                  java.lang.String password,
                  java.util.Map<java.lang.String,java.lang.Object> config)
Description copied from interface: SessionConnection
Communicates login message to the server

Specified by:
login in interface SessionConnection
Parameters:
merchantAccountCode - merchant account code
password - password
config - configuration Map usually indicating connection URL and SSL related parameters

logout

public void logout()
Description copied from interface: SessionConnection
Communicates logout message to the server for a single CustomerAccount

Specified by:
logout in interface SessionConnection

save

public void save(SessionContext sessionContext,
                 java.util.List<CustomerAccount> customerAccounts)
          throws ClientException
Description copied from interface: SessionConnection
Communicates save message to the server for a list of CustomerAccounts

Specified by:
save in interface SessionConnection
customerAccounts - List of CustomerAccounts to be saved
Throws:
ClientException - in case of communication or validation issues

find

public java.util.List<ClientObject> find(SessionContext sessionContext,
                                         java.lang.String queryName,
                                         java.util.Map<java.lang.String,java.lang.Object> parameters)
                                  throws ClientException
Description copied from interface: SessionConnection
Communicates find message to server

Specified by:
find in interface SessionConnection
queryName - name of the query to be executed by the server
parameters - search parameters to use within the query
Returns:
List of objects that matched search criteria
Throws:
ClientException - in case of communication or validation issues

synchronizeWithSessionContext

private void synchronizeWithSessionContext(SessionContext sessionContext,
                                           java.util.List<CustomerAccount> customerAccountList)

getFields

private java.lang.reflect.Field[] getFields(java.lang.Class clazz)

synchronizeClientObject

private void synchronizeClientObject(SessionContext sessionContext,
                                     ClientObject clientObject)

isUpdatedField

private boolean isUpdatedField(java.lang.String className)