com.konakartadmin.rmi
Class KKRMIAdminEngBase

java.lang.Object
  extended by com.konakartadmin.rmi.KKRMIAdminEngBase

public class KKRMIAdminEngBase
extends java.lang.Object

KonaKart RMI Client-side Engine Base for the Admin Engine


Field Summary
private  org.apache.commons.configuration.Configuration allConfig
          Used to read all of the properties from the properties file
private  AdminEngineConfig engConf
          Configuration parameter passed when the engine is instantiated
private  org.apache.commons.configuration.Configuration konakartConfig
          Used to read the KonaKart properties from the properties file
protected static org.apache.commons.logging.Log log
           
private  com.konakartadmin.rmi.KKRMIAdminEngServerIf rmiEngine
          This is our RMI Server reference
private  java.lang.String rmiHost
           
private  int rmiPort
           
private  java.lang.String storeId
           
private  boolean successfullyInitialised
           
 
Constructor Summary
KKRMIAdminEngBase(AdminEngineConfig engConf)
          Constructor with an AdminEngineConfig object.
 
Method Summary
 AdminEngineConfig getEngConf()
           
 com.konakartadmin.rmi.KKRMIAdminEngServerIf getRmiEngine()
           
 java.lang.String getRmiHost()
           
 int getRmiPort()
           
 java.lang.String getStoreId()
           
protected  KKAdminException handleThrowable(java.lang.Throwable e, java.lang.String methodName)
          Handles the exception for all methods.
 void init()
           
 boolean isSuccessfullyInitialised()
           
 void setEngConf(AdminEngineConfig engConf)
           
 void setRmiEngine(com.konakartadmin.rmi.KKRMIAdminEngServerIf rmiEngine)
           
 void setRmiHost(java.lang.String rmiHost)
           
 void setRmiPort(int rmiPort)
           
 void setStoreId(java.lang.String storeId)
           
 void setSuccessfullyInitialised(boolean successfullyInitialised)
           
protected  void setupKonaKartConfig()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

allConfig

private org.apache.commons.configuration.Configuration allConfig
Used to read all of the properties from the properties file


konakartConfig

private org.apache.commons.configuration.Configuration konakartConfig
Used to read the KonaKart properties from the properties file


rmiPort

private int rmiPort

rmiHost

private java.lang.String rmiHost

successfullyInitialised

private boolean successfullyInitialised

storeId

private java.lang.String storeId

rmiEngine

private com.konakartadmin.rmi.KKRMIAdminEngServerIf rmiEngine
This is our RMI Server reference


engConf

private AdminEngineConfig engConf
Configuration parameter passed when the engine is instantiated

Constructor Detail

KKRMIAdminEngBase

public KKRMIAdminEngBase(AdminEngineConfig engConf)
                  throws KKAdminException
Constructor with an AdminEngineConfig object.

Parameters:
engConf -
Throws:
KKAdminException
Method Detail

init

public void init()
          throws KKAdminException
Throws:
KKAdminException

setupKonaKartConfig

protected void setupKonaKartConfig()
                            throws java.lang.Exception
Throws:
java.lang.Exception

handleThrowable

protected KKAdminException handleThrowable(java.lang.Throwable e,
                                           java.lang.String methodName)
Handles the exception for all methods. If the exception is a RemoteException or ServerException and has a cause exception, then we add the cause exception instead of the RemoteException, although we do save the message of the RemoteException or SrverException.

We do this so that the receiver can detect the cause exception and act on it. Otherwise it gets lost.

Parameters:
e -
methodName -
Returns:
Returns an exception

getRmiPort

public int getRmiPort()
Returns:
the rmiPort

setRmiPort

public void setRmiPort(int rmiPort)
Parameters:
rmiPort - the rmiPort to set

getRmiHost

public java.lang.String getRmiHost()
Returns:
the rmiHost

setRmiHost

public void setRmiHost(java.lang.String rmiHost)
Parameters:
rmiHost - the rmiHost to set

isSuccessfullyInitialised

public boolean isSuccessfullyInitialised()
Returns:
the successfullyInitialised

setSuccessfullyInitialised

public void setSuccessfullyInitialised(boolean successfullyInitialised)
Parameters:
successfullyInitialised - the successfullyInitialised to set

getStoreId

public java.lang.String getStoreId()
Returns:
the storeId

setStoreId

public void setStoreId(java.lang.String storeId)
Parameters:
storeId - the storeId to set

getRmiEngine

public com.konakartadmin.rmi.KKRMIAdminEngServerIf getRmiEngine()
                                                         throws KKAdminException
Returns:
the rmiEngine
Throws:
KKAdminException

setRmiEngine

public void setRmiEngine(com.konakartadmin.rmi.KKRMIAdminEngServerIf rmiEngine)
Parameters:
rmiEngine - the rmiEngine to set

getEngConf

public AdminEngineConfig getEngConf()
Returns:
the engConf

setEngConf

public void setEngConf(AdminEngineConfig engConf)
Parameters:
engConf - the engConf to set


Copyright © 2011 DS Data Systems UK Ltd.