public class BackendCommandHandler extends java.lang.Thread implements DBManEventListenerI, BackendCommandHandlerI
Modifier and Type | Field and Description |
---|---|
static int |
HANDLED_OK |
static int |
HANDLED_WANT_EXIT |
static org.apache.log4j.Logger |
log |
Constructor and Description |
---|
BackendCommandHandler(BackendProtocolServer _backend,
java.lang.String _logString,
TransportI _transport,
java.lang.String _postfix,
java.lang.String _ip,
java.lang.String _tname) |
Modifier and Type | Method and Description |
---|---|
void |
cancelRequest(int slot) |
PermissionHandlerDecisionI |
checkReadAllowed(BO bo) |
void |
close() |
void |
close(boolean fromDecCommandHandler) |
void |
cookEvents(L10nCurrentLocaleProviderI localeProviderForThread,
java.lang.String threadName) |
void |
createSessionForLogin(Anmeldung anmeldung,
java.lang.String claddr,
java.lang.String clport) |
void |
enterLoginMode() |
boolean |
exists(java.lang.Long id,
java.lang.Class<? extends BOI> classtip) |
BackendProtocolServerI |
getBackend() |
BackendQueryAnsweringBOLoaderI |
getBackendQueryAnsweringBOLoaderInstance()
Returns a new BackendQueryAnsweringBOLoaderI which is aware that it is answering a backend query and thus can be asked about that.
|
byte[] |
getBLOB(java.lang.Long id) |
long |
getBLOB(java.lang.Long id,
java.io.DataOutput os) |
long |
getBLOB(java.lang.Long id,
java.io.DataOutput os,
boolean closeOS) |
long |
getBLOB(java.lang.Long id,
java.io.DataOutput os,
boolean closeOS,
java.lang.Long backuppingBPId) |
byte[] |
getBLOB(java.lang.Long id,
java.lang.Long backuppingBPId) |
InputStreamWrapper |
getBLOBAsStream(java.lang.Long id) |
InputStreamWrapper |
getBLOBAsStream(java.lang.Long id,
java.lang.Long backuppingBPId) |
InitialBLOBTransferMetaDataContainer |
getBLOBBOIdsForIntitialBLOBCopy(java.util.Map idsAndVFilesOnSyncNode,
java.util.List pendingBLOBChangeBOIdsOnSyncNode,
java.util.List pendingBLOBChangeBOIdsOnAuthNode) |
VFile |
getBLOBInfo(java.lang.Long id) |
VFile |
getBLOBInfo(java.lang.Long id,
java.lang.Long backuppingBPId) |
DBManLocalI |
getDbm() |
java.lang.String |
getDescription() |
KeyRange |
getIdRange(long size) |
BOLoaderI |
getLoader() |
java.lang.Long |
getNextId() |
int |
getPid() |
SchemaI |
getSchema() |
BackendSessionI |
getSession() |
DBManUserContextI |
getUtx() |
void |
handleServerSideBackendRequest(BackendRequestI br) |
void |
incObjects() |
void |
initNewSession(java.lang.Long sessionId) |
boolean |
isAuthed() |
boolean |
isBackStreamToClient()
Returns
true , if this backend command handler is acting as back stream to the client, false otherwise. |
boolean |
isLoginMode() |
boolean |
isServerAuth() |
void |
leaveLoginMode() |
void |
processDBManEvent(DBManEvent e)
Processes a DBManEvent by placing it into an ArrayDeque and notifying the BackendCommandHandler,
which is responsible for transporting the event to the client.
|
void |
putResponse(java.lang.Object br) |
java.util.List |
queryBO(java.lang.String t) |
java.util.List |
queryBO(java.lang.String t,
java.lang.Object[] pvals) |
void |
responder()
Worker thread responsible for emptying the responseQueue and sending the actual responses.
|
void |
run() |
void |
startEventListening() |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
start
public static final org.apache.log4j.Logger log
public static final int HANDLED_OK
public static final int HANDLED_WANT_EXIT
public BackendCommandHandler(BackendProtocolServer _backend, java.lang.String _logString, TransportI _transport, java.lang.String _postfix, java.lang.String _ip, java.lang.String _tname)
public DBManLocalI getDbm()
public BackendProtocolServerI getBackend()
getBackend
in interface BackendCommandHandlerI
public BackendSessionI getSession()
getSession
in interface BackendCommandHandlerI
public DBManUserContextI getUtx()
getUtx
in interface BackendCommandHandlerI
public BOLoaderI getLoader()
getLoader
in interface BackendCommandHandlerI
public int getPid()
getPid
in interface BackendCommandHandlerI
public void cancelRequest(int slot)
cancelRequest
in interface BackendCommandHandlerI
public void close()
close
in interface BackendCommandHandlerI
public void close(boolean fromDecCommandHandler)
public boolean isAuthed()
isAuthed
in interface BackendCommandHandlerI
public boolean isLoginMode()
isLoginMode
in interface BackendCommandHandlerI
public boolean isBackStreamToClient()
BackendCommandHandlerI
true
, if this backend command handler is acting as back stream to the client, false
otherwise.isBackStreamToClient
in interface BackendCommandHandlerI
public PermissionHandlerDecisionI checkReadAllowed(BO bo)
checkReadAllowed
in interface BackendCommandHandlerI
public void incObjects()
incObjects
in interface BackendCommandHandlerI
public java.lang.String getDescription()
public BackendQueryAnsweringBOLoaderI getBackendQueryAnsweringBOLoaderInstance()
BackendCommandHandlerI
getBackendQueryAnsweringBOLoaderInstance
in interface BackendCommandHandlerI
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void handleServerSideBackendRequest(BackendRequestI br) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void putResponse(java.lang.Object br)
putResponse
in interface BackendCommandHandlerI
public void responder()
public void initNewSession(java.lang.Long sessionId)
initNewSession
in interface BackendCommandHandlerI
public void createSessionForLogin(Anmeldung anmeldung, java.lang.String claddr, java.lang.String clport) throws AuthenticationException
createSessionForLogin
in interface BackendCommandHandlerI
AuthenticationException
public void enterLoginMode()
enterLoginMode
in interface BackendCommandHandlerI
public void leaveLoginMode()
leaveLoginMode
in interface BackendCommandHandlerI
public void startEventListening()
startEventListening
in interface BackendCommandHandlerI
public void processDBManEvent(DBManEvent e)
processDBManEvent
in interface DBManEventListenerI
e
- The DBManEvent to be processed.public void cookEvents(L10nCurrentLocaleProviderI localeProviderForThread, java.lang.String threadName)
public boolean exists(java.lang.Long id, java.lang.Class<? extends BOI> classtip)
exists
in interface BackendCommandHandlerI
public java.util.List queryBO(java.lang.String t)
public java.util.List queryBO(java.lang.String t, java.lang.Object[] pvals)
public boolean isServerAuth()
isServerAuth
in interface BackendCommandHandlerI
public java.lang.Long getNextId()
getNextId
in interface BackendCommandHandlerI
public KeyRange getIdRange(long size)
getIdRange
in interface BackendCommandHandlerI
public byte[] getBLOB(java.lang.Long id)
public byte[] getBLOB(java.lang.Long id, java.lang.Long backuppingBPId)
public InputStreamWrapper getBLOBAsStream(java.lang.Long id)
public InputStreamWrapper getBLOBAsStream(java.lang.Long id, java.lang.Long backuppingBPId)
public long getBLOB(java.lang.Long id, java.io.DataOutput os)
public long getBLOB(java.lang.Long id, java.io.DataOutput os, boolean closeOS)
public long getBLOB(java.lang.Long id, java.io.DataOutput os, boolean closeOS, java.lang.Long backuppingBPId)
getBLOB
in interface BackendCommandHandlerI
public VFile getBLOBInfo(java.lang.Long id)
public VFile getBLOBInfo(java.lang.Long id, java.lang.Long backuppingBPId)
public InitialBLOBTransferMetaDataContainer getBLOBBOIdsForIntitialBLOBCopy(java.util.Map idsAndVFilesOnSyncNode, java.util.List pendingBLOBChangeBOIdsOnSyncNode, java.util.List pendingBLOBChangeBOIdsOnAuthNode) throws java.io.IOException
java.io.IOException
public SchemaI getSchema()
getSchema
in interface BackendCommandHandlerI
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.