|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
dist1.acb.common.transport.AbstractConnectionServer
dist1.acb.CBL.Primary
The Primary
Nested Class Summary | |
class |
Primary.ClientManager
Client manager |
Field Summary |
Fields inherited from class dist1.acb.common.transport.AbstractConnectionServer |
log, socketPort |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
Primary(java.util.LinkedList replicasBackup)
Constructor for the Primary object |
Method Summary | |
protected AbstractPersonalManager |
createPersonalManager(java.net.Socket s,
java.lang.ThreadGroup group)
Concrete creating a PersonalManager |
java.util.logging.Logger |
getLogger()
Returns logger for current server |
java.util.LinkedList |
getReplicasBackup()
Returns list for backuping replicas |
CBL |
getThisCBL()
Returns information about this CBL |
protected void |
handleUnrecoverableError(java.lang.Throwable e)
|
Response |
hBeginSellTransaction(java.lang.String login,
RequestUpdate request)
Handler for request BeginSellTransaction |
Response |
hCloseSession(java.lang.String login,
RequestUpdate request)
Handler for request CloseSession |
Response |
hDeleteOldUsers(java.lang.String login,
RequestUpdate request)
Handler for request DeleteOldUsers |
Response |
hEndSellTransaction(java.lang.String login,
RequestUpdate request)
Handler for request BeginSellTransaction |
Response |
hInitCBLTable(java.lang.String login,
RequestUpdate request)
Handler for request InitCBLTable |
Response |
hInsertLog(java.lang.String login,
RequestUpdate request)
Handler for request insert log |
Response |
hLogin(java.lang.String login,
RequestUpdate request)
Handler for request Login |
Response |
hMoneyFromAccount(java.lang.String login,
RequestUpdate request)
Handler for request MoneyFromAccount |
Response |
hMoneyToAccount(java.lang.String login,
RequestUpdate request)
Handler for request MoneyToAccount |
Response |
hotJoin(RequestForHotJoin request)
Handler for request for HotJoin. |
Response |
hRegister(java.lang.String login,
RequestUpdate request)
Handler for request Register |
Response |
hRemoveCBL(java.lang.String login,
RequestUpdate request)
Handler for request RemoveCBL |
Response |
hRemoveFiles(java.lang.String login,
RequestUpdate request)
Handler for request RemoveFiles |
Response |
hShare(java.lang.String login,
RequestUpdate request)
Handler for request Share |
Response |
hUpdateCBL(java.lang.String login,
RequestUpdate request)
Handler for request insert log |
Response |
hUpdateUser(java.lang.String login,
RequestUpdate request)
Handler for request insert log |
boolean |
isPrimary()
Checks if the current server is the Primary |
void |
run()
Main processing method for the Primary object |
void |
startServer()
Start the server |
void |
stopServer()
Stop the server |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Primary(java.util.LinkedList replicasBackup) throws java.lang.Exception
replicasBackup
- if this parameter is not null, the Primary will
start the work using the HotJoin Protocol
java.lang.Exception
- if something wrongMethod Detail |
public java.util.logging.Logger getLogger()
getLogger
in interface Server
public boolean isPrimary()
isPrimary
in interface Server
public java.util.LinkedList getReplicasBackup()
getReplicasBackup
in interface Server
public CBL getThisCBL()
getThisCBL
in interface Server
public Response hBeginSellTransaction(java.lang.String login, RequestUpdate request)
hBeginSellTransaction
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hCloseSession(java.lang.String login, RequestUpdate request)
hCloseSession
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hDeleteOldUsers(java.lang.String login, RequestUpdate request)
hDeleteOldUsers
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hEndSellTransaction(java.lang.String login, RequestUpdate request)
hEndSellTransaction
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hInitCBLTable(java.lang.String login, RequestUpdate request)
hInitCBLTable
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hInsertLog(java.lang.String login, RequestUpdate request)
hInsertLog
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hLogin(java.lang.String login, RequestUpdate request)
hLogin
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hMoneyFromAccount(java.lang.String login, RequestUpdate request)
hMoneyFromAccount
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hMoneyToAccount(java.lang.String login, RequestUpdate request)
hMoneyToAccount
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hRegister(java.lang.String login, RequestUpdate request)
hRegister
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hRemoveCBL(java.lang.String login, RequestUpdate request)
hRemoveCBL
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hRemoveFiles(java.lang.String login, RequestUpdate request)
hRemoveFiles
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hShare(java.lang.String login, RequestUpdate request)
hShare
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hUpdateCBL(java.lang.String login, RequestUpdate request)
hUpdateCBL
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hUpdateUser(java.lang.String login, RequestUpdate request)
hUpdateUser
in interface UpdatesExecutor
login
- Urer's loginrequest
- The request
public Response hotJoin(RequestForHotJoin request)
request
- The request
public void run()
run
in interface java.lang.Runnable
run
in class AbstractConnectionServer
public void startServer()
startServer
in interface Server
public void stopServer()
stopServer
in interface Server
protected AbstractPersonalManager createPersonalManager(java.net.Socket s, java.lang.ThreadGroup group)
createPersonalManager
in class AbstractConnectionServer
s
- A socket with connected clientgroup
- Thread group to which current thread will be related
protected void handleUnrecoverableError(java.lang.Throwable e)
handleUnrecoverableError
in class AbstractConnectionServer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |