|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jondonym.console.Controller
public class Controller
TODO documentation TODO forwarding server support TODO memory and performance tuning TODO some more functionality tests
Nested Class Summary | |
---|---|
private static class |
Controller.AutoSwitchedMixCascadeContainer
|
static class |
Controller.ForcePremiumIfAccountAvailableAttribute
|
private static class |
Controller.MixCascadeUpdater
|
private static class |
Controller.RunnableStarter
|
Field Summary | |
---|---|
private static java.lang.String[] |
DEFAULT_INFOSERVICE_HOSTNAMES
|
private static java.lang.String[] |
DEFAULT_INFOSERVICE_NAMES
|
private static int[][] |
DEFAULT_INFOSERVICE_PORT_NUMBERS
|
static int |
LOG_DETAIL_LEVEL_HIGH
|
static int |
LOG_DETAIL_LEVEL_HIGHEST
|
static int |
LOG_DETAIL_LEVEL_LOWER
|
static int |
LOG_DETAIL_LEVEL_LOWEST
|
private static boolean |
m_bShuttingDown
|
private static int |
m_iInitLogLevel
|
private static java.lang.String |
MESSAGES
|
private static Controller.MixCascadeUpdater |
ms_cascadeUpdater
|
private static Configuration |
ms_configuration
|
private static PayAccount |
ms_currentlyCreatedAccount
|
private static java.lang.String |
ms_currentPIID
|
private static InfoServiceUpdater |
ms_isUpdater
|
private static AnonProxy |
ms_jondonymProxy
|
private static Log |
ms_logger
|
private static PaymentInstanceUpdater |
ms_paymentUpdater
|
private static PerformanceInfoUpdater |
ms_perfUpdater
|
private static Controller.AutoSwitchedMixCascadeContainer |
ms_serviceContainer
|
private static java.net.ServerSocket |
ms_socketListener
|
private static Controller.RunnableStarter |
ms_starter
|
private static java.lang.Thread |
ms_starterThread
|
private static java.lang.String |
MSG_DEFAULT_TRUST_MODEL
|
private static java.lang.String |
MSG_NO_CHARGED_ACCOUNT
|
private static java.lang.String |
PI_JONDOS
|
private static java.lang.Object |
SYNC_STARTER
|
private static long |
TIMEOUT_RECHARGE
|
private static java.lang.String |
VERSION
|
private static java.lang.String |
XML_ATTR_LOG_DETAIL
|
private static java.lang.String |
XML_ATTR_LOG_LEVEL
|
private static java.lang.String |
XML_ROOT_NODE
|
Constructor Summary | |
---|---|
Controller()
|
Method Summary | |
---|---|
static boolean |
activateCoupon(java.lang.String a_code)
Call this method always before validation of the coupon code with "null" as argument. |
private static boolean |
activateCouponCode(java.lang.String a_code,
PayAccount a_account,
boolean a_bPreCheckOnly)
|
private static void |
checkActiveAccount(PayAccount a_account)
|
private static PayAccount |
createAccount()
|
static java.lang.String |
exportAccounts(java.lang.String a_password)
|
static java.lang.String |
getActivePaymentInstanceID()
|
static java.util.Vector |
getAvailableCascades()
|
static MixCascade |
getCurrentCascade()
|
static long |
getCurrentCredit()
Returns the current credit in bytes. |
private static long |
getCurrentCredit(long a_time)
|
static java.util.Locale |
getLocale()
|
static int |
getLogDetail()
|
static int |
getLogDetailCount()
|
static java.lang.String |
getLogDetailName(int a_detail)
|
static int |
getLogLevel()
|
static int |
getLogLevelCount()
Returns the number of log levels. |
static java.lang.String |
getLogLevelName(int a_level)
|
private static boolean |
importAccounts_internal(java.lang.String a_accountData,
IMiscPasswordReader a_pwReader)
|
static boolean |
importAccounts(java.lang.String a_accountData)
Optionally import without the possibility to enter a password. |
static boolean |
importAccounts(java.lang.String a_accountData,
IMiscPasswordReader a_pwReader)
|
static void |
init(org.apache.log4j.Logger a_logger,
Configuration a_configuration)
|
static boolean |
isCascadeAutoSwitched()
|
static boolean |
isConnected()
|
static boolean |
isRunning()
|
static void |
saveConfiguration()
Tells the program to save the configuration. |
static void |
setActivePaymentInstanceID(java.lang.String a_piid)
|
static void |
setCascadeAutoSwitched(boolean a_bAutoSwitch)
|
static void |
setLocale(java.util.Locale a_locale)
|
static boolean |
setLogDetail(int a_logDetail)
|
static void |
setLogLevel(int a_level)
|
static boolean |
shouldRecharge()
Returns whether the user should recharge. |
static boolean |
start()
|
protected static boolean |
start(MixCascade a_cascade)
|
static void |
stop()
|
static void |
switchCascade()
|
static void |
switchCascade(MixCascade a_cascade)
|
static boolean |
validateCoupon(java.lang.String a_code)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LOG_DETAIL_LEVEL_LOWEST
public static final int LOG_DETAIL_LEVEL_LOWER
public static final int LOG_DETAIL_LEVEL_HIGH
public static final int LOG_DETAIL_LEVEL_HIGHEST
private static final java.lang.String VERSION
private static final java.lang.String XML_ROOT_NODE
private static final java.lang.String MESSAGES
private static final java.lang.String XML_ATTR_LOG_DETAIL
private static final java.lang.String XML_ATTR_LOG_LEVEL
private static final java.lang.String PI_JONDOS
private static final long TIMEOUT_RECHARGE
private static final java.lang.String MSG_NO_CHARGED_ACCOUNT
private static final java.lang.String MSG_DEFAULT_TRUST_MODEL
private static InfoServiceUpdater ms_isUpdater
private static Controller.MixCascadeUpdater ms_cascadeUpdater
private static PaymentInstanceUpdater ms_paymentUpdater
private static PerformanceInfoUpdater ms_perfUpdater
private static java.net.ServerSocket ms_socketListener
private static AnonProxy ms_jondonymProxy
private static Controller.AutoSwitchedMixCascadeContainer ms_serviceContainer
private static java.lang.String ms_currentPIID
private static Configuration ms_configuration
private static Log ms_logger
private static PayAccount ms_currentlyCreatedAccount
private static int m_iInitLogLevel
private static java.lang.Thread ms_starterThread
private static Controller.RunnableStarter ms_starter
private static final java.lang.Object SYNC_STARTER
private static boolean m_bShuttingDown
private static final java.lang.String[] DEFAULT_INFOSERVICE_NAMES
private static final java.lang.String[] DEFAULT_INFOSERVICE_HOSTNAMES
private static final int[][] DEFAULT_INFOSERVICE_PORT_NUMBERS
Constructor Detail |
---|
public Controller()
Method Detail |
---|
public static void init(org.apache.log4j.Logger a_logger, Configuration a_configuration) throws java.lang.Exception
java.lang.Exception
public static int getLogLevelCount()
public static java.lang.String getLogLevelName(int a_level)
public static int getLogLevel()
public static void setLogLevel(int a_level)
public static java.lang.String getLogDetailName(int a_detail)
public static void setLocale(java.util.Locale a_locale)
public static java.util.Locale getLocale()
public static int getLogDetail()
public static int getLogDetailCount()
public static boolean setLogDetail(int a_logDetail)
public static void stop()
public static void switchCascade()
public static void switchCascade(MixCascade a_cascade)
public static void setCascadeAutoSwitched(boolean a_bAutoSwitch)
public static boolean isCascadeAutoSwitched()
public static java.util.Vector getAvailableCascades()
public static MixCascade getCurrentCascade()
public static boolean isRunning()
public static boolean isConnected()
public static java.lang.String getActivePaymentInstanceID()
public static void setActivePaymentInstanceID(java.lang.String a_piid)
private static PayAccount createAccount() throws java.lang.Exception
java.lang.Exception
private static boolean activateCouponCode(java.lang.String a_code, PayAccount a_account, boolean a_bPreCheckOnly) throws java.lang.Exception
java.lang.Exception
public static boolean validateCoupon(java.lang.String a_code) throws java.lang.Exception
a_code
-
java.lang.Exception
- if the account could not be createdpublic static boolean shouldRecharge()
public static long getCurrentCredit()
private static long getCurrentCredit(long a_time)
public static boolean activateCoupon(java.lang.String a_code) throws java.lang.Exception
a_code
-
java.lang.Exception
private static void checkActiveAccount(PayAccount a_account)
public static void saveConfiguration() throws java.lang.Exception
java.lang.Exception
- if an error occurs while saving the configurationpublic static java.lang.String exportAccounts(java.lang.String a_password)
public static boolean importAccounts(java.lang.String a_accountData)
a_accountData
-
public static boolean importAccounts(java.lang.String a_accountData, IMiscPasswordReader a_pwReader)
private static boolean importAccounts_internal(java.lang.String a_accountData, IMiscPasswordReader a_pwReader)
public static boolean start()
protected static boolean start(MixCascade a_cascade)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |